double-hit-balls/assets/SSAA_4X.frag

19 lines
379 B
GLSL
Raw Permalink Normal View History

2017-12-02 10:25:02 +00:00
precision mediump float;
uniform sampler2D Texture;
uniform vec2 samplesOffset[4];
varying vec2 texCoord;
void main()
{
vec3 color = vec3(0, 0, 0);
for (int i = 0; i < 4; ++i)
{
color += texture2D(Texture, texCoord + samplesOffset[i]).rgb;
}
color /= 4;
2017-12-04 11:14:14 +00:00
//gl_FragColor = vec4(texture2D(Texture, texCoord ), 1.0);
gl_FragColor = vec4(color, 1.0);
2017-12-02 10:25:02 +00:00
}