Added terrible fog-of-war

This commit is contained in:
Anuken
2018-06-24 00:09:00 -04:00
parent 0267ad574f
commit 77a63a39ad
9 changed files with 123 additions and 23 deletions

View File

@@ -0,0 +1,16 @@
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D u_texture;
varying vec4 v_color;
varying vec2 v_texCoord;
void main() {
vec4 color = texture2D(u_texture, v_texCoord.xy);
color.a = 1.0 - color.r;
color.rgb = vec3(0.0);
gl_FragColor = color * v_color;
}