fix "the end orb" debug view

This commit is contained in:
Xonk 2024-07-10 17:02:54 -04:00
parent 728ebb9920
commit b32041d4fc
2 changed files with 11 additions and 6 deletions

View File

@ -265,17 +265,22 @@ vec4 GetVolumetricFog(
//------ END STORM EFFECT //------ END STORM EFFECT
// determine where the vortex area ends and chaotic lightning area begins.
float vortexBounds = clamp(vortexBoundRange - length(progressW), 0.0,1.0);
vec3 lightPosition = LightSourcePosition(progressW, cameraPosition, vortexBounds);
vec3 lightColors = LightSourceColors(vortexBounds, lightningflash);
float volumeDensity = fogShape(progressW); float volumeDensity = fogShape(progressW);
float clearArea = 1.0-min(max(1.0 - length(progressW - cameraPosition) / 100,0.0),1.0); float clearArea = 1.0-min(max(1.0 - length(progressW - cameraPosition) / 100,0.0),1.0);
float stormDensity = min(volumeDensity, clearArea*clearArea * END_STORM_DENSTIY); float stormDensity = min(volumeDensity, clearArea*clearArea * END_STORM_DENSTIY);
#ifdef THE_ORB
stormDensity += min(50.0*max(1.0 - length(lightPosition)/10,0.0),1.0);
#endif
float volumeCoeff = exp(-stormDensity*dd*dL); float volumeCoeff = exp(-stormDensity*dd*dL);
// determine where the vortex area ends and chaotic lightning area begins.
float vortexBounds = clamp(vortexBoundRange - length(progressW), 0.0,1.0);
vec3 lightPosition = LightSourcePosition(progressW, cameraPosition, vortexBounds);
vec3 lightColors = LightSourceColors(vortexBounds, lightningflash);
vec3 lightsources = LightSourceLighting(progressW, lightPosition, dither2, volumeDensity, lightColors, vortexBounds); vec3 lightsources = LightSourceLighting(progressW, lightPosition, dither2, volumeDensity, lightColors, vortexBounds);
vec3 indirect = vec3(0.5,0.75,1.0) * 0.2 * (exp((volumeDensity*volumeDensity) * -50) * 0.9 + 0.1); vec3 indirect = vec3(0.5,0.75,1.0) * 0.2 * (exp((volumeDensity*volumeDensity) * -50) * 0.9 + 0.1);

View File

@ -1,4 +1,4 @@
#define SHADER_VERSION_LABEL 481 // [481] #define SHADER_VERSION_LABEL 482 // [482]
#define saturate(x) clamp(x,0.0,1.0) #define saturate(x) clamp(x,0.0,1.0)