fix SSGI/RTAO in nether. fix LPV fog brightness slider not working right. add color picker for the selection box outline

This commit is contained in:
Xonk 2024-06-21 14:20:25 -04:00
parent 60e807cfce
commit 52b5e13155
6 changed files with 28 additions and 10 deletions

View File

@ -450,7 +450,10 @@ void main() {
Indirect_lighting = DoAmbientLightColor(feetPlayerPos, lpvPos, AmbientLightColor, MinimumLightColor, Torch_Color, clamp(lightmap.xy,0,1), exposure);
#ifdef LINES
gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * toLinear(color.rgb);
if(SELECTION_BOX > 0) gl_FragData[0].rgba = vec4(toLinear(vec3(SELECT_BOX_COL_R, SELECT_BOX_COL_G, SELECT_BOX_COL_B)), 1.0);
#else
gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * Albedo;
#endif

View File

@ -788,9 +788,10 @@ void main() {
lightmap.xy = min(max(lightmap.xy - 0.05,0.0)*1.06,1.0); // small offset to hide flickering from precision error in the encoding/decoding on values close to 1.0 or 0.0
#if defined END_SHADER || defined NETHER_SHADER
#if !defined OVERWORLD_SHADER
lightmap.y = 1.0;
#endif
// lightmap.y = 0.0;
// if(isDHrange) lightmap.y = pow(lightmap.y,25);
// if(isEyeInWater == 1) lightmap.y = max(lightmap.y, 0.75);
@ -1102,6 +1103,8 @@ void main() {
vec3 up = skyCloudsFromTexLOD2(vec3(0.0,1.0,0.0), colortex4, 6).rgb / 30.0;
Indirect_lighting = mix(up, Indirect_lighting, clamp(pow(1.0-pow(1.0-SSAO_SSS.x, 0.5),2.0),0.0,1.0));
AmbientLightColor = Indirect_lighting / 5.0;
#endif
#ifdef END_SHADER
@ -1175,7 +1178,10 @@ void main() {
// RTAO and/or SSGI
#if indirect_effect == 3 || indirect_effect == 4
Indirect_lighting = AmbientLightColor;
// Indirect_lighting = AmbientLightColor;
ApplySSRT(Indirect_lighting, viewPos, normal, vec3(bnoise, noise_2), feetPlayerPos, lpvPos, exposure, lightmap.xy, AmbientLightColor*2.5, vec3(TORCH_R,TORCH_G,TORCH_B), isGrass, hand);
#endif

View File

@ -114,7 +114,7 @@ float linearizeDepthFast(const in float depth, const in float near, const in flo
vec3 LpvTorchLight = GetLpvBlockLight(lpvSample);
vec3 lighting = LpvTorchLight;
float density = exp(-5.0 * clamp( 1.0 - length(lpvSample.xyz) / 16.0,0.0,1.0)) * (LPV_VL_FOG_ILLUMINATION_BRIGHTNESS/100) * LpvFadeF;
float density = exp(-5.0 * clamp( 1.0 - length(lpvSample.xyz) / 16.0,0.0,1.0)) * (LPV_VL_FOG_ILLUMINATION_BRIGHTNESS/100.0) * LpvFadeF;
color = lighting - lighting * exp(-density*dd*dL);
}

View File

@ -341,16 +341,18 @@ void ApplySSRT(
// rayDir.y = mix(-1.0, rayDir.y, lightmaps.y*lightmaps.y);
skycontribution = pow(skyCloudsFromTexLOD(rayDir, colortex4, 0).rgb/30, vec3(0.7)) *2.5 * ambient_brightness * Lighting.a + Lighting.rgb;
#else
skycontribution = (pow(skyCloudsFromTexLOD2(rayDir, colortex4, 6).rgb / 30.0,vec3(0.7)) * 2.5 * ambient_brightness) * Lighting.a + skylightcolor*(1-Lighting.a) + Lighting.rgb;
skycontribution = (pow(skyCloudsFromTexLOD2(rayDir, colortex4, 6).rgb / 30.0,vec3(0.7))/2.5 * ambient_brightness) * Lighting.a + skylightcolor*(1-Lighting.a) + Lighting.rgb;
#endif
#else
#ifdef OVERWORLD_SHADER
if(isGrass) rayDir.y = clamp(rayDir.y + 0.25,-1,1);
skycontribution = skylightcolor * (max(rayDir.y,pow(1.0-lightmaps.y,2))*0.95+0.05) + Lighting.rgb;
#else
skycontribution = skylightcolor + Lighting.rgb;
#endif
skycontribution = skylightcolor * (max(rayDir.y,pow(1.0-lightmaps.y,2))*0.95+0.05) + Lighting.rgb;
#if indirect_effect == 4
skycontribution2 = skylightcolor + Lighting.rgb;
#endif

View File

@ -1,4 +1,4 @@
#define SHADER_VERSION_LABEL 458 // [439]
#define SHADER_VERSION_LABEL 459 // [459]
#define saturate(x) clamp(x,0.0,1.0)
@ -668,7 +668,6 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
#define LIT_PARTICLE_BRIGHTNESS 1.0 // [1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 100.]
#define SELECT_BOX
#define LIGHTNING_FLASH // FOR OPTIFINE USERS. some mods change the sky color, which can trigger the lightning flash detection.
@ -766,6 +765,11 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
// #define CLOUDS_INFRONT_OF_WORLD
// #define LARGE_WAVE_DISPLACEMENT
#define SELECT_BOX
#define SELECT_BOX_COL_R 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
#define SELECT_BOX_COL_G 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
#define SELECT_BOX_COL_B 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
// fix settings
#ifdef DH_SCREENSPACE_REFLECTIONS

View File

@ -129,7 +129,7 @@ alphaTest.gbuffers_water = false
alphaTest.gbuffers_skybasic = false
alphaTest.gbuffers_skytextured = false
sliders = LPV_VL_FOG_ILLUMINATION_BRIGHTNESS minRayMarchSteps MOTION_BLUR_STRENGTH OVERDRAW_MAX_DISTANCE DAY0_l0_coverage DAY0_l1_coverage DAY0_l2_coverage DAY0_ufog_density DAY0_l0_density DAY0_l1_density DAY0_l2_density DAY0_cfog_density DAY1_l0_coverage DAY1_l1_coverage DAY1_l2_coverage DAY1_ufog_density DAY1_l0_density DAY1_l1_density DAY1_l2_density DAY1_cfog_density DAY2_l0_coverage DAY2_l1_coverage DAY2_l2_coverage DAY2_ufog_density DAY2_l0_density DAY2_l1_density DAY2_l2_density DAY2_cfog_density DAY3_l0_coverage DAY3_l1_coverage DAY3_l2_coverage DAY3_ufog_density DAY3_l0_density DAY3_l1_density DAY3_l2_density DAY3_cfog_density DAY4_l0_coverage DAY4_l1_coverage DAY4_l2_coverage DAY4_ufog_density DAY4_l0_density DAY4_l1_density DAY4_l2_density DAY4_cfog_density DAY5_l0_coverage DAY5_l1_coverage DAY5_l2_coverage DAY5_ufog_density DAY5_l0_density DAY5_l1_density DAY5_l2_density DAY5_cfog_density DAY6_l0_coverage DAY6_l1_coverage DAY6_l2_coverage DAY6_ufog_density DAY6_l0_density DAY6_l1_density DAY6_l2_density DAY6_cfog_density DAY7_l0_coverage DAY7_l1_coverage DAY7_l2_coverage DAY7_ufog_density DAY7_l0_density DAY7_l1_density DAY7_l2_density DAY7_cfog_density DAY8_l0_coverage DAY8_l1_coverage DAY8_l2_coverage DAY8_ufog_density DAY8_l0_density DAY8_l1_density DAY8_l2_density DAY8_cfog_density DAY9_l0_coverage DAY9_l1_coverage DAY9_l2_coverage DAY9_ufog_density DAY9_l0_density DAY9_l1_density DAY9_l2_density DAY9_cfog_density sss_density_multiplier sss_absorbance_multiplier MOTION_AMOUNT TONEMAP WATER_WAVE_SPEED WATER_CAUSTICS_BRIGHTNESS DEBUG_VIEW entityShadowDistanceMul HANDHELD_LIGHT_RANGE CLOUD_SHADOW_STRENGTH CloudLayer0_coverage CloudLayer0_density CloudLayer0_height CloudLayer1_coverage CloudLayer1_density CloudLayer1_height CloudLayer2_coverage CloudLayer2_density CloudLayer2_height PLANET_GROUND_BRIGHTNESS FOG_START_HEIGHT WATER_WAVE_STRENGTH SWAMP_UNIFORM_DENSITY SWAMP_CLOUDY_DENSITY SWAMP_R SWAMP_G SWAMP_B JUNGLE_UNIFORM_DENSITY JUNGLE_CLOUDY_DENSITY JUNGLE_R JUNGLE_G JUNGLE_B DARKFOREST_UNIFORM_DENSITY DARKFOREST_CLOUDY_DENSITY DARKFOREST_R DARKFOREST_G DARKFOREST_B NETHER_PLUME_DENSITY END_STORM_DENSTIY LIT_PARTICLE_BRIGHTNESS UPPER_CURVE LOWER_CURVE EMISSIVE_TYPE SCALE_FACTOR ambientsss_brightness SSS_TYPE Cloud_Speed ORB_ColMult ORB_X ORB_Y ORB_Z ORB_R ORB_G ORB_B TOD_Fog_mult Morning_Uniform_Fog Noon_Uniform_Fog Evening_Uniform_Fog Night_Uniform_Fog Morning_Cloudy_Fog Noon_Cloudy_Fog Evening_Cloudy_Fog Night_Cloudy_Fog Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B Summer_R Summer_G Summer_B Fall_R Fall_G Fall_B Winter_R Winter_G Winter_B Spring_R Spring_G Spring_B Season_Length CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B indirect_effect GI_Strength ambient_brightness AmbientLight_R AmbientLight_G AmbientLight_B Rain_coverage Moon_temp Haze_amount RainFog_amount Sun_temp Puddle_Size LabSSS_Curve Emissive_Curve Emissive_Brightness AO_Strength BLOOMY_FOG WAVY_SPEED WAVY_STRENGTH BLOOM_STRENGTH shadowDistance Sky_Brightness fog_coefficientMieR fog_coefficientMieG fog_coefficientMieB sun_illuminance sunColorG sunColorB sunColorR sky_mieg sky_coefficientMieB sky_coefficientMieG sky_coefficientMieR sky_coefficientRayleighB sky_coefficientRayleighG sky_coefficientRayleighR CLOUDS_QUALITY EXPOSURE_MULTIPLIER MIN_LIGHT_AMOUNT TORCH_R TORCH_G TORCH_B TORCH_AMOUNT shadowMapResolution sunPathRotation BLEND_FACTOR VL_SAMPLES Exposure_Speed POM_DEPTH MAX_ITERATIONS MAX_DIST SSR_STEPS ambientOcclusionLevel SEA_LEVEL moon_illuminance moonColorR moonColorG moonColorB fog_coefficientRayleighR fog_coefficientRayleighG SATURATION Manual_exposure_value focal aperture MANUAL_FOCUS SHADOW_FILTER_SAMPLE_COUNT Max_Filter_Depth VPS_Search_Samples Min_Shadow_Filter_Radius Max_Shadow_Filter_Radius Water_Top_Layer fog_coefficientRayleighB SHARPENING rayMarchSampleCount Dirt_Amount Dirt_Scatter_R Dirt_Scatter_G Dirt_Scatter_B Dirt_Absorb_R Dirt_Absorb_G Dirt_Absorb_B Water_Absorb_R Water_Absorb_G Water_Absorb_B Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Texture_MipMap_Bias DoF_Adaptation_Speed Purkinje_Multiplier CROSSTALK VL_RENDER_RESOLUTION BLOOM_QUALITY VL_RENDER_RESOLUTION RAY_COUNT STEPS STEP_LENGTH cloud_LevelOfDetail cloud_ShadowLevelOfDetail cloud_LevelOfDetailLQ cloud_ShadowLevelOfDetailLQ minRayMarchSteps maxRayMarchSteps minRayMarchStepsLQ maxRayMarchStepsLQ fbmAmount fbmPower1 fbmPower2 Roughness_Threshold Sun_specular_Strength reflection_quality DOF_QUALITY DOF_ANAMORPHIC_RATIO AEROCHROME_PINKNESS DOF_JITTER_FOCUS JITTER_STRENGTH SHADOWS_GRADE_R MIDS_GRADE_R HIGHLIGHTS_GRADE_R SHADOWS_GRADE_G MIDS_GRADE_G HIGHLIGHTS_GRADE_G SHADOWS_GRADE_B MIDS_GRADE_B HIGHLIGHTS_GRADE_B SHADOWS_GRADE_MUL MIDS_GRADE_MUL HIGHLIGHTS_GRADE_MUL LPV_SATURATION LPV_TINT_SATURATION LPV_NORMAL_STRENGTH
sliders = SELECT_BOX_COL_R SELECT_BOX_COL_G SELECT_BOX_COL_B LPV_VL_FOG_ILLUMINATION_BRIGHTNESS minRayMarchSteps MOTION_BLUR_STRENGTH OVERDRAW_MAX_DISTANCE DAY0_l0_coverage DAY0_l1_coverage DAY0_l2_coverage DAY0_ufog_density DAY0_l0_density DAY0_l1_density DAY0_l2_density DAY0_cfog_density DAY1_l0_coverage DAY1_l1_coverage DAY1_l2_coverage DAY1_ufog_density DAY1_l0_density DAY1_l1_density DAY1_l2_density DAY1_cfog_density DAY2_l0_coverage DAY2_l1_coverage DAY2_l2_coverage DAY2_ufog_density DAY2_l0_density DAY2_l1_density DAY2_l2_density DAY2_cfog_density DAY3_l0_coverage DAY3_l1_coverage DAY3_l2_coverage DAY3_ufog_density DAY3_l0_density DAY3_l1_density DAY3_l2_density DAY3_cfog_density DAY4_l0_coverage DAY4_l1_coverage DAY4_l2_coverage DAY4_ufog_density DAY4_l0_density DAY4_l1_density DAY4_l2_density DAY4_cfog_density DAY5_l0_coverage DAY5_l1_coverage DAY5_l2_coverage DAY5_ufog_density DAY5_l0_density DAY5_l1_density DAY5_l2_density DAY5_cfog_density DAY6_l0_coverage DAY6_l1_coverage DAY6_l2_coverage DAY6_ufog_density DAY6_l0_density DAY6_l1_density DAY6_l2_density DAY6_cfog_density DAY7_l0_coverage DAY7_l1_coverage DAY7_l2_coverage DAY7_ufog_density DAY7_l0_density DAY7_l1_density DAY7_l2_density DAY7_cfog_density DAY8_l0_coverage DAY8_l1_coverage DAY8_l2_coverage DAY8_ufog_density DAY8_l0_density DAY8_l1_density DAY8_l2_density DAY8_cfog_density DAY9_l0_coverage DAY9_l1_coverage DAY9_l2_coverage DAY9_ufog_density DAY9_l0_density DAY9_l1_density DAY9_l2_density DAY9_cfog_density sss_density_multiplier sss_absorbance_multiplier MOTION_AMOUNT TONEMAP WATER_WAVE_SPEED WATER_CAUSTICS_BRIGHTNESS DEBUG_VIEW entityShadowDistanceMul HANDHELD_LIGHT_RANGE CLOUD_SHADOW_STRENGTH CloudLayer0_coverage CloudLayer0_density CloudLayer0_height CloudLayer1_coverage CloudLayer1_density CloudLayer1_height CloudLayer2_coverage CloudLayer2_density CloudLayer2_height PLANET_GROUND_BRIGHTNESS FOG_START_HEIGHT WATER_WAVE_STRENGTH SWAMP_UNIFORM_DENSITY SWAMP_CLOUDY_DENSITY SWAMP_R SWAMP_G SWAMP_B JUNGLE_UNIFORM_DENSITY JUNGLE_CLOUDY_DENSITY JUNGLE_R JUNGLE_G JUNGLE_B DARKFOREST_UNIFORM_DENSITY DARKFOREST_CLOUDY_DENSITY DARKFOREST_R DARKFOREST_G DARKFOREST_B NETHER_PLUME_DENSITY END_STORM_DENSTIY LIT_PARTICLE_BRIGHTNESS UPPER_CURVE LOWER_CURVE EMISSIVE_TYPE SCALE_FACTOR ambientsss_brightness SSS_TYPE Cloud_Speed ORB_ColMult ORB_X ORB_Y ORB_Z ORB_R ORB_G ORB_B TOD_Fog_mult Morning_Uniform_Fog Noon_Uniform_Fog Evening_Uniform_Fog Night_Uniform_Fog Morning_Cloudy_Fog Noon_Cloudy_Fog Evening_Cloudy_Fog Night_Cloudy_Fog Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B Summer_R Summer_G Summer_B Fall_R Fall_G Fall_B Winter_R Winter_G Winter_B Spring_R Spring_G Spring_B Season_Length CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B indirect_effect GI_Strength ambient_brightness AmbientLight_R AmbientLight_G AmbientLight_B Rain_coverage Moon_temp Haze_amount RainFog_amount Sun_temp Puddle_Size LabSSS_Curve Emissive_Curve Emissive_Brightness AO_Strength BLOOMY_FOG WAVY_SPEED WAVY_STRENGTH BLOOM_STRENGTH shadowDistance Sky_Brightness fog_coefficientMieR fog_coefficientMieG fog_coefficientMieB sun_illuminance sunColorG sunColorB sunColorR sky_mieg sky_coefficientMieB sky_coefficientMieG sky_coefficientMieR sky_coefficientRayleighB sky_coefficientRayleighG sky_coefficientRayleighR CLOUDS_QUALITY EXPOSURE_MULTIPLIER MIN_LIGHT_AMOUNT TORCH_R TORCH_G TORCH_B TORCH_AMOUNT shadowMapResolution sunPathRotation BLEND_FACTOR VL_SAMPLES Exposure_Speed POM_DEPTH MAX_ITERATIONS MAX_DIST SSR_STEPS ambientOcclusionLevel SEA_LEVEL moon_illuminance moonColorR moonColorG moonColorB fog_coefficientRayleighR fog_coefficientRayleighG SATURATION Manual_exposure_value focal aperture MANUAL_FOCUS SHADOW_FILTER_SAMPLE_COUNT Max_Filter_Depth VPS_Search_Samples Min_Shadow_Filter_Radius Max_Shadow_Filter_Radius Water_Top_Layer fog_coefficientRayleighB SHARPENING rayMarchSampleCount Dirt_Amount Dirt_Scatter_R Dirt_Scatter_G Dirt_Scatter_B Dirt_Absorb_R Dirt_Absorb_G Dirt_Absorb_B Water_Absorb_R Water_Absorb_G Water_Absorb_B Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Texture_MipMap_Bias DoF_Adaptation_Speed Purkinje_Multiplier CROSSTALK VL_RENDER_RESOLUTION BLOOM_QUALITY VL_RENDER_RESOLUTION RAY_COUNT STEPS STEP_LENGTH cloud_LevelOfDetail cloud_ShadowLevelOfDetail cloud_LevelOfDetailLQ cloud_ShadowLevelOfDetailLQ minRayMarchSteps maxRayMarchSteps minRayMarchStepsLQ maxRayMarchStepsLQ fbmAmount fbmPower1 fbmPower2 Roughness_Threshold Sun_specular_Strength reflection_quality DOF_QUALITY DOF_ANAMORPHIC_RATIO AEROCHROME_PINKNESS DOF_JITTER_FOCUS JITTER_STRENGTH SHADOWS_GRADE_R MIDS_GRADE_R HIGHLIGHTS_GRADE_R SHADOWS_GRADE_G MIDS_GRADE_G HIGHLIGHTS_GRADE_G SHADOWS_GRADE_B MIDS_GRADE_B HIGHLIGHTS_GRADE_B SHADOWS_GRADE_MUL MIDS_GRADE_MUL HIGHLIGHTS_GRADE_MUL LPV_SATURATION LPV_TINT_SATURATION LPV_NORMAL_STRENGTH
screen.columns=2
screen = \
@ -343,12 +343,15 @@ 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 SELECT_BOX DISABLE_ENCHANT_GLINT DISABLE_VANILLA_EMISSIVES PARTICLE_RENDERING_FIX TRANSLUCENT_ENTITIES LIGHTING_EFFECTS_BLUR_FILTER
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.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
screen.selection_box_outline.columns = 1
screen.selection_box_outline = SELECT_BOX SELECT_BOX_COL_R SELECT_BOX_COL_G SELECT_BOX_COL_B
#####################################