res/shaders/ags001.shader/ags001.fs (view raw)
1varying vec2 texCoord;
2uniform sampler2D tex;
3uniform vec2 texSize;
4
5void main() {
6 vec4 color = texture2D(tex, texCoord);
7 vec3 arrayX[4];
8 arrayX[0] = vec3(1.0, 0.2, 0.2);
9 arrayX[1] = vec3(0.2, 1.0, 0.2);
10 arrayX[2] = vec3(0.2, 0.2, 1.0);
11 arrayX[3] = vec3(0.4, 0.4, 0.4);
12 vec3 arrayY[4];
13 arrayY[0] = vec3(1.0, 1.0, 1.0);
14 arrayY[1] = vec3(1.0, 1.0, 1.0);
15 arrayY[2] = vec3(1.0, 1.0, 1.0);
16 arrayY[3] = vec3(0.9, 0.9, 0.9);
17 color.rgb = pow(color.rgb, vec3(1.6, 1.6, 1.6));
18 color.rgb *= arrayX[int(mod(texCoord.s * texSize.x * 4.0, 4.0))];
19 color.rgb *= arrayY[int(mod(texCoord.t * texSize.y * 4.0, 4.0))];
20 color.a = 0.8;
21 gl_FragColor = color;
22}