make cave fog falloff do stuff. add option to use old cave detection methods

This commit is contained in:
Xonk
2024-06-21 15:07:03 -04:00
parent 0a63b165c8
commit cfbdedfd4c
3 changed files with 37 additions and 34 deletions

View File

@ -345,7 +345,7 @@ SHADER_VERSION_LABEL <empty> \
######## MISC SETTINGS
screen.Misc_Settings = [EXPERIMENTAL_STUFF] DEBUG_VIEW [the_end_orb] display_LUT WhiteWorld SSS_view ambientLight_only LIGHTNING_FLASH DISABLE_ENCHANT_GLINT DISABLE_VANILLA_EMISSIVES PARTICLE_RENDERING_FIX TRANSLUCENT_ENTITIES LIGHTING_EFFECTS_BLUR_FILTER [selection_box_outline]
screen.EXPERIMENTAL_STUFF = CLOUDS_INTERSECT_TERRAIN BLOOMY_PARTICLES ORIGINAL_CHOCAPIC_SKY BIOME_TINT_WATER HYPER_DETAILED_WAVES OLD_BLOOM PLANET_GROUND_BRIGHTNESS LIT_PARTICLE_BRIGHTNESS WATER_CAUSTICS_BRIGHTNESS
screen.EXPERIMENTAL_STUFF = CLOUDS_INTERSECT_TERRAIN BLOOMY_PARTICLES ORIGINAL_CHOCAPIC_SKY BIOME_TINT_WATER HYPER_DETAILED_WAVES OLD_BLOOM PLANET_GROUND_BRIGHTNESS LIT_PARTICLE_BRIGHTNESS WATER_CAUSTICS_BRIGHTNESS OLD_CAVE_DETECTION
screen.the_end_orb.columns = 1
screen.the_end_orb = THE_ORB ORB_X ORB_Y ORB_Z ORB_ColMult ORB_R ORB_G ORB_B
@ -481,24 +481,28 @@ uniform.float.noPuddleAreas = smooth(if(in(biome, 3, 4, 16, 37, 39, 48, 49, 31,
#endif
#endif
#if defined OLD_CAVE_DETECTION
variable.bool.inTheDarkTimer = smooth(if(eyeBrightness.y < 0.01, 1.0, 0.0), 30.0, 1.0) > 0.99
# the idea is to modulate the mood value between 0 - 1
# then check if the modulated value is non-zero. when it goes back to zero, it will have a very slowly deteriorating value.
# that value immediately regenerates when it modulates to 1 again. this way, i can check if the mood is climbing by checking if the smoothed value is above zero.
uniform.float.caveDetection = smooth(if(inTheDarkTimer, 1.0, 0.0), 10.0, 0.5)
#else
# the idea is to modulate the mood value between 0 - 1
# then check if the modulated value is non-zero. when it goes back to zero, it will have a very slowly deteriorating value.
# that value immediately regenerates when it modulates to 1 again. this way, i can check if the mood is climbing by checking if the smoothed value is above zero.
# doing this is just for readablity, not required.
variable.float.playerMoodPercent = playerMood*100.0 + 1.0
# modulo 0 - 1
variable.float.modMood = playerMoodPercent - floor(playerMoodPercent)
# doing this is just for readablity, not required.
variable.float.playerMoodPercent = playerMood*100.0 + 1.0
# modulo 0 - 1
variable.float.modMood = playerMoodPercent - floor(playerMoodPercent)
# check if mood is increasing.
# and only activate when mood is above the threshold (5% mood)
# make sure it degenerates slow enough that mood can reach 5% after the mood flips to 0% from 100%
variable.bool.moodIsClimbing = smooth(if(modMood > 0.50 && playerMoodPercent > 4.0, 1.0, eyeBrightness.x/240.0), 0.0, 10.0) > 0.1
# add one more check to turn it off when lightlevels are not zero
uniform.float.caveDetection = smooth(if(moodIsClimbing && eyeBrightness.y < 0.01, 1.0, 0.0), 3.0, 1.0)
# check if mood is increasing.
# and only activate when mood is above the threshold (5% mood)
# make sure it degenerates slow enough that mood can reach 5% after the mood flips to 0% from 100%
variable.bool.moodIsClimbing = smooth(if(modMood > 0.50 && playerMoodPercent > 4.0, 1.0, eyeBrightness.x/240.0), 0.0, 10.0) > 0.1
# add one more check to turn it off when lightlevels are not zero
uniform.float.caveDetection = smooth(if(moodIsClimbing && eyeBrightness.y < 0.01, 1.0, 0.0), 3.0, 1.0)
#endif
# photon stuff