Cloud fog

cloud fog?
This commit is contained in:
Xonk
2023-06-10 23:30:29 -04:00
parent 2e7d464b14
commit b8799363ed
15 changed files with 263 additions and 64 deletions

View File

@ -175,10 +175,12 @@ void main() {
moonColorCloud = calculateAtmosphere(vec3(0.0), modSunVec, vec3(0.0,1.0,0.0), sunVec, -sunVec, planetSphere, skyAbsorb, 25,0.5);
moonColorCloud = moonColorBase/4000.0*0.55;
// #ifndef CLOUDS_SHADOWS
// sunColor *= (1.0-rainStrength*vec3(0.96,0.95,0.94));
// moonColor *= (1.0-rainStrength*vec3(0.96,0.95,0.94));
// #endif
lightSourceColor = sunVis >= 1e-5 ? sunColor * sunVis : moonColor * moonVis;
float lightDir = float( sunVis >= 1e-5)*2.0-1.0;
@ -196,7 +198,7 @@ void main() {
ambientDown += bouncedSun*clamp(lightDir*sunVec.y+4.,0.0,4.)*0.7 + cloudAmbientSun*clamp(-sunVec.y+2.,0.0,4.)*0.5 + cloudAmbientMoon*clamp(sunVec.y+2.,0.0,4.)*0.5;
avgSky += bouncedSun*5.;
vec3 rainNightBoost = moonColorCloud*rainStrength*0.005;
vec3 rainNightBoost = moonColorCloud*0.005;
ambientUp += rainNightBoost;
ambientLeft += rainNightBoost;
ambientRight += rainNightBoost;