X-Git-Url: https://git.lukelau.me/?a=blobdiff_plain;f=billboardfrag.glsl;h=b4cfd511464569ea23c577cda41a5b261c7ba288;hb=fb589ed247f5441995b750bb5145239acab3ef09;hp=c2e480bf88a930278ffe6f472f8be86c02b1bddd;hpb=e4bfe561fba2c32bf5ecdbf6a96067676ab313a2;p=clouds.git diff --git a/billboardfrag.glsl b/billboardfrag.glsl index c2e480b..b4cfd51 100644 --- a/billboardfrag.glsl +++ b/billboardfrag.glsl @@ -13,7 +13,7 @@ void main() { return; } if (debug) { - FragColor = mix(vec4(1, 1, 1, 1), vec4(1, 0, 0, 1), debugVal); + FragColor = mix(vec4(1, 1, 1, 0), vec4(1, 0, 0, 1), debugVal); return; } // Cf = color from fragment, Ct = color from texture @@ -25,7 +25,9 @@ void main() { // GL_MODULATE: C // C = Cf * Ct // A = Af * At - FragColor = color * f; + // the +0.06 is a hack to get lighter clouds! + // can be thought of as ambient light + FragColor = color * (f + 0.02); } else { // "That is, the colors in the frame buffer are multiplied by the // attenuation ratio of the billboard texture and then the colors in