1 // Multi-texture fragment shader
4 // Composite second texture over first.
5 // We're assuming the 2nd texture has a meaningful alpha channel.
7 uniform sampler2D tex1;
8 uniform sampler2D tex2;
12 vec4 t1 = texture2D(tex1, gl_Color.xy);
13 vec4 t2 = texture2D(tex2, gl_Color.yz);
14 gl_FragColor = mix(t1, t2, t2.w);