gtk2/gsk/resources/glsl/shadow.fs.glsl
Timm Bäder fd0b7caa7c gl renderer: Fix shadow shader
We need to take the alpha of the shadow color into account as well.
2017-12-21 19:12:32 +01:00

14 lines
236 B
GLSL

uniform vec4 u_color;
void main() {
vec4 diffuse = Texture(u_source, vUv);
vec4 color = u_color;
// pre-multiply
color.rgb *= color.a;
color = vec4(u_color.rgb * diffuse.a, diffuse.a * color.a);
setOutputColor(color);
}