X-Git-Url: https://git.lukelau.me/?p=clouds.git;a=blobdiff_plain;f=billboardfrag.glsl;fp=billboardfrag.glsl;h=046b7bd3bca6e335cd847e6e6dc4151f4edf03fa;hp=94d15dcb2f1e477e90ed7cba724dedfcc4f49308;hb=0258cd283dc666dd89f620179f57343662ab5d1a;hpb=9059716493de4ffe224dea7477d2503ebcd0f01b diff --git a/billboardfrag.glsl b/billboardfrag.glsl index 94d15dc..046b7bd 100644 --- a/billboardfrag.glsl +++ b/billboardfrag.glsl @@ -4,7 +4,13 @@ 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 -- not set, defaults to (0,0,0,0) // Af = alpha from fragment, At = alpha from texture