8 // Cf = color from fragment, Ct = color from texture
9 // Cc = color from texture environment -- not set, defaults to (0,0,0,0)
10 // Af = alpha from fragment, At = alpha from texture
11 // C = output color, A = output alpha
12 float f = texture(tex, texCoord).r;
17 FragColor = color * f;
20 // C = Cf * (1-Ct) + Cc * Ct
22 vec3 C = color.rgb * (1 - f);
23 float A = color.a * f;
24 FragColor = vec4(C, A);