re-implement "render fog with clouds" option.

This commit is contained in:
Xonk
2023-12-26 19:57:30 -05:00
parent 993c57a34a
commit 2d64880893
10 changed files with 203 additions and 170 deletions

View File

@ -250,7 +250,7 @@ void main() {
if (isEyeInWater == 0){
#ifdef OVERWORLD_SHADER
vec4 VolumetricFog = GetVolumetricFog(viewPos, noise_1, lightCol.rgb/80.0, averageSkyCol/30.0);
vec4 VolumetricFog = GetVolumetricFog(viewPos, vec2(noise_1,noise_2), lightCol.rgb/80.0, averageSkyCol/30.0);
#endif
#if defined NETHER_SHADER || defined END_SHADER

View File

@ -195,7 +195,7 @@ 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., 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;
gl_FragData[0] = vec4(sky,1.0);

View File

@ -104,7 +104,7 @@ void main() {
pos = normalize(vec3(0,1,0));
pos.xy += normalize(sample3x3[i]) * vec2(0.3183,0.90);
averageSkyCol_Clouds += 2.0*skyCloudsFromTex(pos,colortex4).rgb/maxIT/150.;
averageSkyCol_Clouds += 1.5*skyCloudsFromTex(pos,colortex4).rgb/maxIT/150.;
averageSkyCol += 1.5*skyFromTex(pos,colortex4).rgb/maxIT/150.;
}