fix hardcoded ambient light skylight direction being used when rtao/ssgi are enabled. remove skylight direction as lightmap falls off for all AO effects.. bring back lightning flash effect on the world

This commit is contained in:
Xonk
2023-10-26 18:02:14 -04:00
parent 2a5de55319
commit 6fdc95dff4
3 changed files with 12 additions and 14 deletions

View File

@ -257,6 +257,8 @@ void ApplySSRT(
#ifdef OVERWORLD_SHADER
if(isGrass) rayDir.y = clamp(rayDir.y + 0.5,-1,1);
rayDir.y = mix(-1.0,rayDir.y, lightmaps.y*lightmaps.y);
skycontribution = (skyCloudsFromTexLOD(rayDir, colortex4, 0).rgb / 10.0) * Lighting.a + Lighting.rgb;
#else
skycontribution = (skyCloudsFromTexLOD2(rayDir, colortex4, 6).rgb / 10.0) * Lighting.a + Lighting.rgb;
@ -267,7 +269,7 @@ void ApplySSRT(
if(isGrass) rayDir.y = clamp(rayDir.y + 0.25,-1,1);
#endif
skycontribution = skylightcolor * (max(rayDir.y,0.0)*0.9+0.1) + Lighting.rgb;
skycontribution = skylightcolor * (max(rayDir.y,pow(1.0-lightmaps.y,2))*0.9+0.1) + Lighting.rgb;
#if indirect_effect == 4
skycontribution2 = skylightcolor + Lighting.rgb;

View File

@ -261,13 +261,6 @@ vec4 renderClouds(
#ifdef Cumulus
// float shadowStepSize[3] = float[](
// 0.05,
// 0.25 + Dither.y*0.1,
// 0.50 + Dither.y*0.1
// );
for(int i=0;i<maxIT_clouds;i++) {
// IntersecTerrain = length(progress_view - cameraPosition) > lViewPosM;