Mindustry/core/assets/shaders/fog.fragment

18 lines
319 B
Plaintext

#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D u_texture;
const float round = 0.01;
varying vec4 v_color;
varying vec2 v_texCoord;
void main() {
vec4 color = texture2D(u_texture, v_texCoord.xy);
color = vec4(0.0, 0.0, 0.0, 1.0 - color.r);
gl_FragColor = color * v_color;
}