fix tiny issue

This commit is contained in:
Xonk 2023-06-10 23:42:45 -04:00
parent b8799363ed
commit 63f515f7a2

View File

@ -253,9 +253,9 @@ vec4 InsideACloudFog(
float cloudhsadow = 1;
#ifdef VL_CLOUDS_SHADOWS #ifdef VL_CLOUDS_SHADOWS
sh *= GetCloudShadow_VLFOG(progressW); cloudhsadow = sh * GetCloudShadow_VLFOG(progressW);
#endif #endif
float densityVol = cloudVol(progressW); float densityVol = cloudVol(progressW);
@ -269,20 +269,19 @@ vec4 InsideACloudFog(
vec3 rL = rC*airCoef.x; vec3 rL = rC*airCoef.x;
vec3 m = (airCoef.y+density)*mC; vec3 m = (airCoef.y+density)*mC;
vec3 DirectLight = (Fog_SunCol*sh) * (rayL*rL+m*mie); vec3 DirectLight = (Fog_SunCol*cloudhsadow) * (rayL*rL+m*mie);
vec3 AmbientLight = Fog_SkyCol * m; vec3 AmbientLight = Fog_SkyCol * m;
vec3 AtmosphericFog = Fog_SkyCol * (rL+m) ; vec3 AtmosphericFog = Fog_SkyCol * (rL+m) ;
// extra fog effects // extra fog effects
vec3 rainRays = (sunColor*sh) * (rayL*phaseg(SdotV,0.5)) * clamp(pow(WsunVec.y,5)*2,0.0,1) * rainStrength * RainFog_amount; vec3 rainRays = (sunColor*cloudhsadow) * (rayL*phaseg(SdotV,0.5)) * clamp(pow(WsunVec.y,5)*2,0.0,1) * rainStrength * RainFog_amount;
vec3 CaveRays = (sunColor*sh) * phaseg(SdotV,0.7) * 0.001 * (1.0 - max(eyeBrightnessSmooth.y,0)/240.); vec3 CaveRays = (sunColor*cloudhsadow) * phaseg(SdotV,0.7) * 0.001 * (1.0 - max(eyeBrightnessSmooth.y,0)/240.);
vec3 vL0 = (DirectLight + AmbientLight + AtmosphericFog + rainRays ) * max(eyeBrightnessSmooth.y,0)/240. + CaveRays ; vec3 vL0 = (DirectLight + AmbientLight + AtmosphericFog + rainRays ) * max(eyeBrightnessSmooth.y,0)/240. + CaveRays ;
color += (vL0 - vL0 * exp(-(rL+m)*dd*dL)) / ((rL+m)+0.00000001)*total_extinction; color += (vL0 - vL0 * exp(-(rL+m)*dd*dL)) / ((rL+m)+0.00000001)*total_extinction;
total_extinction *= dot(clamp(exp(-(rL+m)*dd*dL),0.0,1.0), vec3(0.333333)); total_extinction *= dot(clamp(exp(-(rL+m)*dd*dL),0.0,1.0), vec3(0.333333));
sh = 1.0; // make sure cloud shadows dont shadow the clouds hurhur
progress_view = progressW; progress_view = progressW;
float cumulus = GetCumulusDensity(progress_view, 1); float cumulus = GetCumulusDensity(progress_view, 1);
@ -305,8 +304,8 @@ vec4 InsideACloudFog(
MoonLight += shadow; MoonLight += shadow;
} }
Sunlight += 1.0 - sh; Sunlight += (1-sh) * 100.;
MoonLight += 1.0 - sh; MoonLight += (1-sh) * 100.;
#ifdef Altostratus #ifdef Altostratus
// cast a shadow from higher clouds onto lower clouds // cast a shadow from higher clouds onto lower clouds