Mindustry/core/assets/shaders/light.frag
Anuken 732769524c 🔥🔥🔥
2020-06-11 12:03:27 -04:00

11 lines
246 B
GLSL

uniform sampler2D u_texture;
uniform vec4 u_ambient;
varying vec2 v_texCoord;
void main(){
vec4 color = texture2D(u_texture, v_texCoord);
gl_FragColor = clamp(vec4(mix(u_ambient.rgb, color.rgb, color.a), u_ambient.a - color.a), 0.0, 1.0);
}