diff --git a/shaders/composite1.fsh b/shaders/composite1.fsh index d31edb6..027cb24 100644 --- a/shaders/composite1.fsh +++ b/shaders/composite1.fsh @@ -852,8 +852,12 @@ void main() { DirectLightColor = vec3(0.0); #endif - if(hand) DirectLightColor *= max(eyeBrightnessSmooth.y,0)/240.; - + #ifdef OLD_LIGHTLEAK_FIX + DirectLightColor *= pow(clamp(eyeBrightnessSmooth.y/240. + lightmap.y,0.0,1.0),2.0); + #else + if(hand) DirectLightColor *= pow(clamp(eyeBrightnessSmooth.y/240. + lightmap.y,0.0,1.0),2.0); + #endif + vec3 AmbientLightColor = averageSkyCol_Clouds; diff --git a/shaders/lib/settings.glsl b/shaders/lib/settings.glsl index fe0dd4f..6a5af8a 100644 --- a/shaders/lib/settings.glsl +++ b/shaders/lib/settings.glsl @@ -436,4 +436,6 @@ uniform int moonPhase; #define Lightning_R 0.3 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 ] #define Lightning_G 0.6 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 ] -#define Lightning_B 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 ] \ No newline at end of file +#define Lightning_B 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 ] + +// #define OLD_LIGHTLEAK_FIX \ No newline at end of file diff --git a/shaders/shaders.properties b/shaders/shaders.properties index cc0ccab..a1e7be7 100644 --- a/shaders/shaders.properties +++ b/shaders/shaders.properties @@ -65,7 +65,7 @@ PhysicsMod_support [LabPBR] ######## LIGHTING ### DIRECT LIGHT screen.Direct_Light.columns=1 - screen.Direct_Light = [Shadows] [Subsurface_Scattering] [Sun_and_Moon_Colors] sunPathRotation sun_illuminance moon_illuminance + screen.Direct_Light = [Shadows] [Subsurface_Scattering] [Sun_and_Moon_Colors] sunPathRotation sun_illuminance moon_illuminance OLD_LIGHTLEAK_FIX screen.Shadows.columns=1 screen.Shadows = SCREENSPACE_CONTACT_SHADOWS RENDER_ENTITY_SHADOWS [Filtering] shadowMapResolution shadowDistance shadowDistanceRenderMul