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 // the +0.06 is a hack to get lighter clouds!
29 // can be thought of as ambient light
30 FragColor = color * (f + 0.02);
32 // "That is, the colors in the frame buffer are multiplied by the
33 // attenuation ratio of the billboard texture and then the colors in
34 // the texture are added"
36 // C = Cf * (1-Ct) + Cc * Ct
38 vec3 C = color.rgb * (1 - f);
39 float A = color.a * f;
40 FragColor = vec4(C, A);