Added terrible fog-of-war
This commit is contained in:
16
core/assets/shaders/fog.fragment
Normal file
16
core/assets/shaders/fog.fragment
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user