8 uniform bool debugColor;
9 uniform float debugVal;
16 FragColor = mix(vec4(1, 1, 1, 0), vec4(1, 0, 0, 1), debugVal);
19 // Cf = color from fragment, Ct = color from texture
20 // Cc = color from texture environment -- not set, defaults to (0,0,0,0)
21 // Af = alpha from fragment, At = alpha from texture
22 // C = output color, A = output alpha
23 float f = texture(tex, texCoord).r;
28 FragColor = color * (f + 0.03); // the +0.03 is a hack to get lighter clouds!
30 // "That is, the colors in the frame buffer are multiplied by the
31 // attenuation ratio of the billboard texture and then the colors in
32 // the texture are added"
34 // C = Cf * (1-Ct) + Cc * Ct
36 vec3 C = color.rgb * (1 - f);
37 float A = color.a * f;
38 FragColor = vec4(C, A);