4 uniform sampler2D render;
13 vec2 p = gl_TexCoord[0].st;
14 vec4 color = texture2D(render, p);
18 a += int(1254.2654*time);
23 a -= int(1254.2654*p.x);
28 a ^= int(1254.2654*p.y);
34 vec4 colornoise = vec4(float((a%347))/348, float((a%853))/854, float((a%973))/974, 0.0);
35 vec4 bwnoise = float((a%1483))/1484 * vec4(1,1,1,0);
37 colornoise = colornoise * 2 - 1;
38 bwnoise = bwnoise * 2 - 1;
42 float darkness = (1 - ((color.r + color.g + color.b)/3)) * 0.8;
43 darkness = clamp(darkness * darkness * darkness - 0.3, 0.0, 1.0);
45 gl_FragColor = color + radius * darkness * ( (v * colornoise) + ((1-v)*bwnoise) );