atmosphere: keep Rayleigh sky behind terrain and make haze neutral

This commit is contained in:
Richard Zink committed 2026-10-12 16:50:07 +02:00
1 parent d8ff29bde5
commit 83bec11d61
1 file changed
+1 -2
+1 -2
View File
@@ -368,8 +368,7 @@ var FRAG_SRC = [
'float dens = exp(-alt / Hs) / Hs;',
'float dtau = uAtmoDensity * dens * step;',
'float transBefore = exp(-tau);',
'float grayMix = clamp(tau / max(0.01, uAtmoGrayTau), 0.0, 1.0);',
'vec3 atmoCol = mix(uAtmoBlueColor, uAtmoGrayColor, grayMix);',
'vec3 atmoCol = uAtmoGrayColor;',
'vec3 light = uSunColor * uSunInt * sunPhase + uMoonColor * uMoonInt * moonPhase * 2.0 + max(vec3(uSkyAmb), uStarAmb * vec3(0.7, 0.85, 1.0)) * 0.65;',
'scatter += atmoCol * light * dtau * transBefore;',
'tau += dtau;',