small tweak to fix VL fog after flying above clouds. fix issue where reflections got the wrong fog function

This commit is contained in:
Xonk
2024-02-10 19:18:31 -05:00
parent 7d65d65179
commit 12df326c72
2 changed files with 6 additions and 144 deletions

View File

@ -276,6 +276,7 @@ if (gl_FragCoord.x > 18.+257. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257+
vec3 sky = texelFetch2D(colortex4,ivec2(gl_FragCoord.xy)-ivec2(257,0),0).rgb/150.0;
vec3 suncol = lightSourceColor;
#ifdef ambientLight_only
suncol = vec3(0.0);
#endif
@ -283,9 +284,8 @@ if (gl_FragCoord.x > 18.+257. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257+
vec4 clouds = renderClouds(mat3(gbufferModelView)*viewVector*1024., vec2(fract(frameCounter/1.6180339887),1-fract(frameCounter/1.6180339887)), suncol*1.75, skyGroundCol/30.0);
sky = sky*clouds.a + clouds.rgb / 5.0;
// vec4 VL_Fog = GetVolumetricFog(mat3(gbufferModelView)*viewVector*1024., vec2(fract(frameCounter/1.6180339887),1-fract(frameCounter/1.6180339887)), lightSourceColor*1.75, skyGroundCol/30.0);
vec4 VL_Fog = DH_GetVolumetricFog(mat3(gbufferModelView)*viewVector*1024., vec2(fract(frameCounter/1.6180339887),1-fract(frameCounter/1.6180339887)), lightSourceColor*1.75, skyGroundCol/30.0);
vec4 VL_Fog = GetVolumetricFog(mat3(gbufferModelView)*viewVector*1024., vec2(fract(frameCounter/1.6180339887),1-fract(frameCounter/1.6180339887)), lightSourceColor*1.75, skyGroundCol/30.0);
sky = sky * VL_Fog.a + VL_Fog.rgb / 5.0;