fix fog render scaling in end/nether. fix translucents scaling wrong when TAAU is on. fix tall plants tops waving wrong.

This commit is contained in:
Xonk
2023-08-06 16:14:32 -04:00
parent a4df4d3006
commit 6bea0d3cae
10 changed files with 44 additions and 38 deletions

View File

@ -74,23 +74,25 @@ vec4 GetVolumetricFog(
vec3 progress = start.xyz + d*dV;
vec3 progressW = gbufferModelViewInverse[3].xyz+cameraPosition + d*dVWorld;
// do main lighting
float Density = cloudVol(progressW) * pow(exp(max(progressW.y-65,0.0) / -15),2);
float densityVol = cloudVol(progressW) * pow(exp(max(progressW.y-65,0.0) / -15),2);
float density = min(densityVol,0.019);
float fireLight = cloudVol(progressW - vec3(0,1,0)) * clamp(exp(max(30 - progressW.y,0.0) / -10.0),0,1);
float fireLight = cloudVol(progressW - vec3(0,1,0)) * clamp(exp(abs(progressW.y-30) / -1),0,1);
vec3 vL0 = vec3(1.0,0.4,0.2) * exp(fireLight * -25) * exp(max(progressW.y-30,0.0) / -10) * 25;
vL0 += vec3(0.8,0.8,1.0) * (1.0 - exp(Density * -1)) / 10 ;
vL0 += vec3(0.8,0.8,1.0) * (1.0 - exp(densityVol * -1)) / 10 ;
// do background fog lighting
float Air = 0.01;
float AirDensity = 0.01;
vec3 vL1 = fogcolor / 20.0;
;
vL += (vL1 - vL1*exp(-Air*dd*dL)) * absorbance;
vL += (vL0 - vL0*exp(-Density*dd*dL)) * absorbance;
vL += (vL1 - vL1*exp(-AirDensity*dd*dL)) * absorbance;
vL += (vL0 - vL0*exp(-density*dd*dL)) * absorbance;
absorbance *= exp(-(Density+Air)*dd*dL);
absorbance *= exp(-(density+AirDensity)*dd*dL);
if (absorbance < 1e-5) break;
}

View File

@ -403,14 +403,15 @@ uniform int moonPhase;
// ----- NETHER RELATED SETTINGS ----- //
/////////////////////////////////////////
#define NetherFog_brightness 0.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.75 0.8 0.85 0.9 0.95 1.0]
#define PLUME_DENSITY 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 ]
//////////////////////////////////////
// ----- END RELATED SETTINGS ----- //
//////////////////////////////////////
#define END_STORM_DENSTIY 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 ]
// #define DEBUG_endfog
// #define THE_ORB
#define ORB_X 0 // [-200 -195 -190 -185 -180 -175 -170 -165 -160 -155 -150 -145 -140 -135 -130 -125 -120 -115 -110 -105 -100 -95 -90 -85 -80 -75 -70 -65 -60 -55 -50 -45 -40 -35 -30 -25 -20 -15 -10 -5 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200]