Mindustry/core/assets/shaders/fog.frag

13 lines
296 B
GLSL
Raw Normal View History

2022-02-11 23:33:06 +07:00
#define HIGHP
#define QUANT 0.3
uniform sampler2D u_texture;
varying vec4 v_color;
varying vec2 v_texCoords;
void main(){
vec4 color = texture2D(u_texture, v_texCoords.xy);
2022-02-20 04:24:22 +07:00
gl_FragColor = vec4(1.0, 1.0, 1.0, (1.0 - floor(color.r / QUANT) * QUANT) * (step(color.r, 0.99))) * v_color;
2022-02-11 23:33:06 +07:00
}