X-Git-Url: https://git.lukelau.me/?a=blobdiff_plain;f=billboardfrag.glsl;h=046b7bd3bca6e335cd847e6e6dc4151f4edf03fa;hb=0258cd283dc666dd89f620179f57343662ab5d1a;hp=2349e4dfef4610558042a9f6b8315e1ac217800a;hpb=31f19438c73b207f506ba0b1187d2de75c166a5b;p=clouds.git diff --git a/billboardfrag.glsl b/billboardfrag.glsl index 2349e4d..046b7bd 100644 --- a/billboardfrag.glsl +++ b/billboardfrag.glsl @@ -4,9 +4,15 @@ uniform sampler2D tex; in vec2 texCoord; out vec4 FragColor; uniform bool modulate; +uniform bool debugContDist; +uniform float density; void main() { + if (debugContDist) { + FragColor = mix(vec4(1, 1, 1, 1), vec4(1, 0, 0, 1), density); + 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;