Fix ellipsoids in simulation
[clouds.git] / billboardfrag.glsl
index 2349e4dfef4610558042a9f6b8315e1ac217800a..16e074e616aae9ea8101b38a11564982e249c894 100644 (file)
@@ -4,9 +4,15 @@ uniform sampler2D tex;
 in vec2 texCoord;
 out vec4 FragColor;
 uniform bool modulate;
+uniform bool debug;
+uniform float debugVal;
 void main() {
+  if (debug) {
+    FragColor = mix(vec4(1, 1, 1, 1), vec4(1, 0, 0, 1), debugVal);
+    return;
+  }
        // Cf = color from fragment, Ct = color from texture
-       // Cc = color from texture environment(?) assume to be 0?
+       // Cc = color from texture environment -- not set, defaults to (0,0,0,0)
        // Af = alpha from fragment, At = alpha from texture
        // C = output color, A = output alpha
        float f = texture(tex, texCoord).r;