fix accidental disabling of water enter altitude fallback

This commit is contained in:
Xonk
2025-03-10 15:11:05 -04:00
parent e41969436f
commit c2468666f2

View File

@ -523,10 +523,10 @@ uniform.float.wetnessAmount = smooth(if(rainStrength > 0.01, 3.0, 0.0), 100.0, 1
# using the smooth() function to interpolate to the newest value of eyeAltitude over time, i can make it take a very long time to interpolate. essentially freezing/unfreezing the value in place at any time i need to.
# force water surface level to a fixed height if you entered the water from an area in low light levels (caves). if youre above the hardcoded y level, allow it use the current height
variable.float.waterEnteredLowLight = if(eyeBrightness.y < 0.004, max(eyeAltitude - 0.1, SEA_LEVEL), eyeAltitude - 0.1)
variable.float.waterEnteredLowLight = if(eyeBrightness.y < 0.004, max(eyeAltitude, SEA_LEVEL), eyeAltitude)
variable.float.freezeTranstion = if(isEyeInWater == 1, 100000000000000.0, 0.0)
uniform.float.waterEnteredAltitude = smooth(eyeAltitude, freezeTranstion, freezeTranstion)
uniform.float.waterEnteredAltitude = smooth(waterEnteredLowLight, freezeTranstion, freezeTranstion)
# photon stuff
uniform.vec2.view_res = vec2(viewWidth, viewHeight)