diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index a57db79..230a384 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -188,8 +188,9 @@ var FRAG_SRC = [ // is not the same as 'is it night'). // Only darkens the sky, NOT the clouds — we want them to stay // moon-lit (their colour came from uLight) while the sky around - // them goes dark. The cloud mask 'cloud' tells us how much of - // this pixel is cloud, so fully cloudy pixels keep their colour. + // them goes dark. transmittance tells us how much light made it + // through the cloud layer (1 = clear, 0 = fully cloudy). + 'float cloud = 1.0 - trans;', 'float skyDarkness = nightFactor * 0.85;', 'col = mix(col, col * (1.0 - skyDarkness), 1.0 - cloud);', 'gl_FragColor = vec4(col, 1.0);',