Merge pull request #164 from Null-MC/floodfill.saturation

FloodFill Saturation
This commit is contained in:
Xonk 2024-06-09 15:40:51 -04:00 committed by GitHub
commit 87d6641e3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 33 additions and 4 deletions

View File

@ -37,6 +37,19 @@ const ivec3 workGroups = ivec3(6, 6, 1);
uint BuildLpvMask(const in uint north, const in uint east, const in uint south, const in uint west, const in uint up, const in uint down) { uint BuildLpvMask(const in uint north, const in uint east, const in uint south, const in uint west, const in uint up, const in uint down) {
return east | (west << 1) | (down << 2) | (up << 3) | (south << 4) | (north << 5); return east | (west << 1) | (down << 2) | (up << 3) | (south << 4) | (north << 5);
} }
mat4 GetSaturationMatrix(const in float saturation) {
const vec3 luminance = vec3(0.3086, 0.6094, 0.0820);
vec3 lumSat = luminance * (1.0 - saturation);
vec2 satZero = vec2(saturation, 0.0);
return mat4(
vec4(lumSat.r + satZero.xyy, 0.0),
vec4(lumSat.g + satZero.yxy, 0.0),
vec4(lumSat.b + satZero.yyx, 0.0),
vec4(0.0, 0.0, 0.0, 1.0));
}
#endif #endif
@ -1050,6 +1063,12 @@ void main() {
// hack to increase light (if set) // hack to increase light (if set)
if (lightRange > 0.0) lightRange += 1.0; if (lightRange > 0.0) lightRange += 1.0;
// apply saturation changes to light and tint colors
const float saturationF = LPV_SATURATION / 100.0;
mat4 matSaturation = GetSaturationMatrix(saturationF);
lightColor = (matSaturation * vec4(lightColor, 1.0)).rgb;
tintColor = (matSaturation * vec4(tintColor, 1.0)).rgb;
// lazy fix for migrating from mixWeight to tintColor // lazy fix for migrating from mixWeight to tintColor
tintColor *= mixWeight; tintColor *= mixWeight;

View File

@ -98,6 +98,8 @@ screen.Direct_Light = Direct Light
value.LPV_SIZE.6 = Small [64] value.LPV_SIZE.6 = Small [64]
value.LPV_SIZE.7 = Medium [128] value.LPV_SIZE.7 = Medium [128]
value.LPV_SIZE.8 = Large [256] value.LPV_SIZE.8 = Large [256]
option.LPV_SATURATION = Saturation
suffix.LPV_SATURATION=%
option.LPV_NORMAL_STRENGTH = Normal Strength option.LPV_NORMAL_STRENGTH = Normal Strength
suffix.LPV_NORMAL_STRENGTH = % suffix.LPV_NORMAL_STRENGTH = %
value.LPV_NORMAL_STRENGTH.0 = OFF value.LPV_NORMAL_STRENGTH.0 = OFF
@ -540,6 +542,13 @@ screen.Ambient_light.comment = Configure settings related to the lighting in sha
screen.Ambient_Colors.comment = Configure the color of light in shaded areas. screen.Ambient_Colors.comment = Configure the color of light in shaded areas.
screen.Torch_Colors.comment = Configure the color of light from torches or other placed lightsources. screen.Torch_Colors.comment = Configure the color of light from torches or other placed lightsources.
option.LPV_SIZE.comment = Configures the size (in blocks) of the volume for colored lighting.
option.LPV_SATURATION.comment = Configures the intensity of colored lighting.
option.LPV_NORMAL_STRENGTH.comment = Configure the amount surface normals will affect lighting direction.
option.LPV_ENTITY_LIGHTS.comment = Allows entities to contribute to colored lighting.
option.LPV_REDSTONE_LIGHTS.comment = Allows redstone blocks to contribute to colored lighting.
option.LPV_COLORED_CANDLES.comment = Allows colored candles to emit matching colored lighting.
screen.LabPBR.comment = A handfull of effects that use information provided by any resourcepack that follows the LabPBR format. screen.LabPBR.comment = A handfull of effects that use information provided by any resourcepack that follows the LabPBR format.
screen.Reflections.comment = Configure the reflections that use information provided by a LabPBR resourcepack. screen.Reflections.comment = Configure the reflections that use information provided by a LabPBR resourcepack.
option.Specular_Reflections.comment = Toggle all reflections for Labpbr packs. This enables the sun reflection, and allows other settings to be enabled below. §aPERFORMANCE COST:§r low option.Specular_Reflections.comment = Toggle all reflections for Labpbr packs. This enables the sun reflection, and allows other settings to be enabled below. §aPERFORMANCE COST:§r low

View File

@ -710,14 +710,15 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
//#define LPV_ENABLED //#define LPV_ENABLED
#define LPV_SIZE 7 // [6 7 8] #define LPV_SIZE 7 // [6 7 8]
#define LPV_NORMAL_STRENGTH 50 // [0 10 20 30 40 50 60 70 80 90 100] #define LPV_SATURATION 100 // [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]
#define LPV_NORMAL_STRENGTH 50 // [0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100]
#define LPV_NORMAL_OFFSET #define LPV_NORMAL_OFFSET
#define LPV_ENTITY_LIGHTS #define LPV_ENTITY_LIGHTS
#define LPV_REDSTONE_LIGHTS #define LPV_REDSTONE_LIGHTS
//#define LPV_COLORED_CANDLES //#define LPV_COLORED_CANDLES
// Fix for making nether/end work until next Iris release to fix shadow matrices // Fix for making nether/end work until next Iris release to fix shadow matrices
#define LPV_NOSHADOW_HACK //#define LPV_NOSHADOW_HACK
#ifdef LPV_ENABLED #ifdef LPV_ENABLED
#ifdef IRIS_FEATURE_CUSTOM_IMAGES #ifdef IRIS_FEATURE_CUSTOM_IMAGES

View File

@ -113,7 +113,7 @@ alphaTest.gbuffers_water = false
alphaTest.gbuffers_skybasic = false alphaTest.gbuffers_skybasic = false
alphaTest.gbuffers_skytextured = false alphaTest.gbuffers_skytextured = false
sliders = 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 CONTRAST 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_NORMAL_STRENGTH sliders = 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 CONTRAST 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_NORMAL_STRENGTH
screen.columns=2 screen.columns=2
screen = \ screen = \
@ -171,7 +171,7 @@ BLISS_SHADERS <empty> \
### FloodFill ### FloodFill
screen.LPV.columns = 1 screen.LPV.columns = 1
screen.LPV = LPV_ENABLED LPV_SIZE LPV_NORMAL_STRENGTH LPV_ENTITY_LIGHTS LPV_REDSTONE_LIGHTS LPV_COLORED_CANDLES screen.LPV = LPV_ENABLED LPV_SIZE LPV_SATURATION LPV_NORMAL_STRENGTH LPV_ENTITY_LIGHTS LPV_REDSTONE_LIGHTS LPV_COLORED_CANDLES
######## WORLD ######## WORLD
screen.World.columns=1 screen.World.columns=1
screen.World = [Water] [Waving_Stuff] [LabPBR] SKY_GROUND RESOURCEPACK_SKY <empty> AEROCHROME_MODE AEROCHROME_PINKNESS AEROCHROME_WOOL_ENABLED screen.World = [Water] [Waving_Stuff] [LabPBR] SKY_GROUND RESOURCEPACK_SKY <empty> AEROCHROME_MODE AEROCHROME_PINKNESS AEROCHROME_WOOL_ENABLED