From 32a35e2225d1e22e7d35f0564dc4aff8e597e4bb Mon Sep 17 00:00:00 2001 From: Xonk Date: Wed, 16 Apr 2025 17:21:42 -0400 Subject: [PATCH] tweak SSS values/groups --- shaders/dimensions/all_solid.vsh | 17 ++++++++++++----- shaders/dimensions/composite1.fsh | 6 +++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/shaders/dimensions/all_solid.vsh b/shaders/dimensions/all_solid.vsh index caf5201..b10994b 100644 --- a/shaders/dimensions/all_solid.vsh +++ b/shaders/dimensions/all_solid.vsh @@ -294,15 +294,18 @@ void main() { /////// ----- SSS ON BLOCKS ----- /////// // strong if ( - mc_Entity.x == BLOCK_GROUND_WAVING || mc_Entity.x == BLOCK_GROUND_WAVING_VERTICAL || mc_Entity.x == BLOCK_AIR_WAVING || - mc_Entity.x == BLOCK_GRASS_SHORT || mc_Entity.x == BLOCK_GRASS_TALL_UPPER || mc_Entity.x == BLOCK_GRASS_TALL_LOWER || - mc_Entity.x == BLOCK_SSS_STRONG || mc_Entity.x == BLOCK_SAPLING - /*|| (mc_Entity.x >= 410 && mc_Entity.x <= 415) || (mc_Entity.x >= 402 && mc_Entity.x <= 405) THIS IS FOR MCME NEW TREES.*/ + mc_Entity.x == BLOCK_SSS_STRONG || mc_Entity.x == BLOCK_SAPLING || mc_Entity.x == BLOCK_AIR_WAVING ) { SSSAMOUNT = 1.0; } // medium + if ( + mc_Entity.x == BLOCK_GROUND_WAVING || mc_Entity.x == BLOCK_GROUND_WAVING_VERTICAL + || mc_Entity.x == BLOCK_GRASS_SHORT || mc_Entity.x == BLOCK_GRASS_TALL_UPPER || mc_Entity.x == BLOCK_GRASS_TALL_LOWER + ) { + SSSAMOUNT = 0.5; + } if ( mc_Entity.x == BLOCK_SSS_WEAK || mc_Entity.x == BLOCK_SSS_WEAK_2 || mc_Entity.x == BLOCK_GLOW_LICHEN || mc_Entity.x == BLOCK_SNOW_LAYERS || mc_Entity.x == BLOCK_CARPET || @@ -314,7 +317,11 @@ void main() { // low #ifdef MISC_BLOCK_SSS - if(mc_Entity.x == BLOCK_SSS_WEIRD || mc_Entity.x == BLOCK_GRASS) SSSAMOUNT = 0.4; + if( + mc_Entity.x == BLOCK_SSS_WEIRD || mc_Entity.x == BLOCK_GRASS + ){ + SSSAMOUNT = 0.5; + } #endif #ifdef ENTITIES diff --git a/shaders/dimensions/composite1.fsh b/shaders/dimensions/composite1.fsh index cdff830..6c93617 100644 --- a/shaders/dimensions/composite1.fsh +++ b/shaders/dimensions/composite1.fsh @@ -648,7 +648,11 @@ vec3 SubsurfaceScattering_sun(vec3 albedo, float Scattering, float Density, floa vec3 absorbColor = exp(max(luma(albedo) - albedo*vec3(1.0,1.1,1.2), 0.0) * -20.0 * sss_absorbance_multiplier); - vec3 scatter = scatterDepth * mix(absorbColor, vec3(1.0), scatterDepth) * pow(Density, LabSSS_Curve);//* (1-min(max((1-Density)-0.9, 0.0)/(1.0-0.9),1.0)); + vec3 scatter = scatterDepth * mix(absorbColor, vec3(1.0), scatterDepth); + + #if SSS_TYPE == 3 + scatter *= pow(Density, LabSSS_Curve); + #endif scatter *= 1.0 + CustomPhase(lightPos)*6.0; // ~10x brighter at the peak