Tweak ambient light color sampling to be more gooder

This commit is contained in:
Xonk
2023-06-28 17:14:08 -04:00
parent 4d2c35c526
commit c4c2e0d2d7
7 changed files with 20 additions and 11 deletions

View File

@ -139,7 +139,7 @@ vec3 calculateAtmosphere(vec3 background, vec3 viewVector, vec3 upVector, vec3 s
scatteringSun += sky_coefficientsScattering * (stepAirmass.xy * phaseSun ) * stepScatteringVisible * sky_transmittance(position, sunVector*0.5+0.1, jSteps) ;
scatteringMoon += sky_coefficientsScattering * (stepAirmass.xy * phaseMoon) * stepScatteringVisible * sky_transmittance(position, moonVector, jSteps);
// Nice way to fake multiple scattering.
scatteringAmbient += sky_coefficientsScattering * stepAirmass.xy * (stepScatteringVisible * low_sun );
scatteringAmbient += sky_coefficientsScattering * stepAirmass.xy * (stepScatteringVisible * low_sun);
transmittance *= stepTransmittance ;
}