Lehm
05-28-2005, 03:53 PM
I'm trying to overlay a texture ontop of another in a fragment shader. Problem is that it becomes transparent around the "edges" of the top texture.
tColor1 = texture2D(bTexture, vec2(gl_TexCoord[0]));
tColor2 = texture2D(tTexture, vec2(gl_TexCoord[1]));
gl_FragColor = tColor1 * ( 1.0 - tColor2.a )+ tColor2 * tColor2.a;
tColor1 = texture2D(bTexture, vec2(gl_TexCoord[0]));
tColor2 = texture2D(tTexture, vec2(gl_TexCoord[1]));
gl_FragColor = tColor1 * ( 1.0 - tColor2.a )+ tColor2 * tColor2.a;