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;
14 vec4 t1 = texture2D(tex1, gl_TexCoord[0].xy);
15 vec4 t2 = texture2D(tex2, gl_TexCoord[1].xy);
16 gl_FragColor = t1 + t2 + UniV1 + UniV2;