diff --git a/shaders/composite1.fsh b/shaders/composite1.fsh index 8c67cb4..1af57d5 100644 --- a/shaders/composite1.fsh +++ b/shaders/composite1.fsh @@ -601,6 +601,8 @@ void rtGI(inout vec3 lighting, vec3 normal,vec2 noise,vec3 fragpos, float lightm vec3 SubsurfaceScattering_sun(vec3 albedo, float Scattering, float Density, float lightPos){ + + float labcurve = pow(Density,LabSSS_Curve); float density = sqrt(30 - labcurve*15); @@ -939,8 +941,14 @@ void main() { #ifdef Sub_surface_scattering #ifdef Variable_Penumbra_Shadows - - SSS = SubsurfaceScattering_sun(albedo, SHADOWBLOCKERDEPTBH, LabSSS, clamp(dot(np3, WsunVec),0.0,1.0)) ; + + float sunSSS_density = LabSSS; + #ifndef RENDER_ENTITY_SHADOWS + if(entities) sunSSS_density = 0.0; + #endif + + + SSS = SubsurfaceScattering_sun(albedo, SHADOWBLOCKERDEPTBH, sunSSS_density, clamp(dot(np3, WsunVec),0.0,1.0)) ; SSS *= DirectLightColor; if (isEyeInWater == 0) SSS *= lightleakfix; // light leak fix #endif diff --git a/shaders/lang/en_us.lang b/shaders/lang/en_us.lang index 53b98bd..8bee0ee 100644 --- a/shaders/lang/en_us.lang +++ b/shaders/lang/en_us.lang @@ -9,6 +9,7 @@ screen.Direct_Light = Direct Light screen.Filtering = Shadow Filtering Settings screen.Shadows = Shadows option.SCREENSPACE_CONTACT_SHADOWS = Contact Shadows + option.RENDER_ENTITY_SHADOWS = Shadows for Entities option.shadowMapResolution = Shadow Resolution option.shadowDistance = Shadow Distance diff --git a/shaders/lib/settings.glsl b/shaders/lib/settings.glsl index 022d58a..c45bf7a 100644 --- a/shaders/lib/settings.glsl +++ b/shaders/lib/settings.glsl @@ -273,6 +273,9 @@ const float shadowDistanceRenderMul = -1.0; //[-1.0 1.0] THIS WILL BREAK SUBSURF #define SHADOW_DISABLE_ALPHA_MIPMAPS // Disables mipmaps on the transparency of alpha-tested things like foliage, may cost a few fps in some cases #define Stochastic_Transparent_Shadows // Highly recommanded to enable SHADOW_DISABLE_ALPHA_MIPMAPS with it. Uses noise to simulate transparent objects' shadows (not colored). It is also recommended to increase Min_Shadow_Filter_Radius with this. +#define RENDER_ENTITY_SHADOWS + + // --- SSGI/RTAO --- diff --git a/shaders/shaders.properties b/shaders/shaders.properties index 7108a65..ef73571 100644 --- a/shaders/shaders.properties +++ b/shaders/shaders.properties @@ -1,5 +1,12 @@ #shaders/shaders.properties #Minecraft Settings + +#ifndef RENDER_ENTITY_SHADOWS + shadowBlockEntities = false + shadowEntities = false +#endif + + oldLighting=false underwaterOverlay=false sun=true @@ -57,7 +64,7 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds] screen.Direct_Light = [Shadows] [Subsurface_Scattering] [Sun_and_Moon_Colors] sunPathRotation sun_illuminance moon_illuminance screen.Shadows.columns=1 - screen.Shadows = SCREENSPACE_CONTACT_SHADOWS [Filtering] shadowMapResolution shadowDistance + screen.Shadows = SCREENSPACE_CONTACT_SHADOWS RENDER_ENTITY_SHADOWS [Filtering] shadowMapResolution shadowDistance screen.Subsurface_Scattering.columns=1 screen.Subsurface_Scattering = SSS_TYPE LabSSS_Curve Ambient_SSS ambientsss_brightness @@ -179,7 +186,7 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds] screen.Editing = Compositing_Sky CompSky_R CompSky_G CompSky_B ######## MISC SETTINGS screen.Misc_Settings.columns=1 - screen.Misc_Settings = [the_orb] [lightning_color] WhiteWorld ambientLight_only Glass_Tint display_LUT ambientSSS_view + screen.Misc_Settings = [the_orb] [lightning_color] WhiteWorld ambientLight_only Glass_Tint display_LUT ambientSSS_view screen.the_orb.columns = 1 screen.the_orb = THE_ORB ORB_X ORB_Y ORB_Z ORB_ColMult ORB_R ORB_G ORB_B @@ -366,8 +373,6 @@ uniform.float.shadowMaxProj = 150.0/abs(sunPosY) - - # photon shit uniform.vec2.view_res = vec2(viewWidth, viewHeight) uniform.vec2.view_pixel_size = vec2(1.0 / viewWidth, 1.0 / viewHeight) \ No newline at end of file diff --git a/shaders/shadow.fsh b/shaders/shadow.fsh index b398e50..9242060 100644 --- a/shaders/shadow.fsh +++ b/shaders/shadow.fsh @@ -25,6 +25,9 @@ void main() { gl_FragData[0].a = texture2DLod(tex,texcoord.xy,0).a; #endif + #ifdef RENDER_ENTITY_SHADOWS + #endif + #ifdef Stochastic_Transparent_Shadows gl_FragData[0].a = float(gl_FragData[0].a >= R2_dither()); #endif