Author: davedes (posted 2012-08-13 16:38:33, viewed 117 times)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
| #ifdef GL_ES
precision highp float;
#endif
uniform vec2 resolution;
uniform float time;
uniform sampler2D tex0;
void main(void)
{
vec2 q = gl_FragCoord.xy / resolution.xy;
vec2 uv = vec2(q.x, 1.0-q.y);
vec4 color = texture2D(tex0, uv);
float brightness = 0.5;
float contrast = 3.0;
color.rgb /= color.a;
color.rgb = ((color.rgb - 0.5) * max(contrast, 0.0)) + 0.5;
color.rgb += brightness;
color.rgb *= color.a;
gl_FragColor = vec4(color);
} |
Special syntax:
- To highlight a line (yellow background), prefix it with '@@'
- To indicate that a line should be removed (red background), prefix it with '-'
- To indicate that a line should be added (green background), prefix it with '+'
- To post multiple snippets, seperate them by '~~~~'
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|