Mindustry/core/assets/shaders/light.frag

11 lines
248 B
GLSL
Raw Normal View History

2019-09-28 09:59:02 +07:00
uniform sampler2D u_texture;
uniform vec4 u_ambient;
2020-06-15 05:41:42 +07:00
varying vec2 v_texCoords;
2019-09-28 09:59:02 +07:00
void main(){
2020-06-15 05:41:42 +07:00
vec4 color = texture2D(u_texture, v_texCoords);
2019-10-04 09:39:57 +07:00
gl_FragColor = clamp(vec4(mix(u_ambient.rgb, color.rgb, color.a), u_ambient.a - color.a), 0.0, 1.0);
2019-09-28 09:59:02 +07:00
}