From 0a63b165c8fefe4de2e11f4088a5ef095bd6ce01 Mon Sep 17 00:00:00 2001 From: Xonk Date: Fri, 21 Jun 2024 14:32:25 -0400 Subject: [PATCH] fix minimum light for HQ ambient light --- shaders/lib/indirect_lighting_effects.glsl | 4 +++- shaders/lib/settings.glsl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shaders/lib/indirect_lighting_effects.glsl b/shaders/lib/indirect_lighting_effects.glsl index 3945056..a66f32a 100644 --- a/shaders/lib/indirect_lighting_effects.glsl +++ b/shaders/lib/indirect_lighting_effects.glsl @@ -320,7 +320,6 @@ void ApplySSRT( // rgb = torch color * lightmap. a = sky lightmap. vec4 Lighting = RT_AmbientLight(playerPos, lpvPos, Exposure, lightmaps, torchcolor); - // skylightcolor = skylightcolor * ambient_brightness * Lighting.a; skylightcolor = max(skylightcolor * ambient_brightness * Lighting.a, vec3(1.0) * (MIN_LIGHT_AMOUNT*0.01 + nightVision)); for (int i = 0; i < nrays; i++){ @@ -343,6 +342,9 @@ void ApplySSRT( #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; #endif + + + skycontribution = max(skycontribution, vec3(1.0) * (MIN_LIGHT_AMOUNT*0.01 + nightVision)); #else #ifdef OVERWORLD_SHADER diff --git a/shaders/lib/settings.glsl b/shaders/lib/settings.glsl index ab33f83..85e7ce8 100644 --- a/shaders/lib/settings.glsl +++ b/shaders/lib/settings.glsl @@ -1,4 +1,4 @@ -#define SHADER_VERSION_LABEL 459 // [459] +#define SHADER_VERSION_LABEL 460 // [460] #define saturate(x) clamp(x,0.0,1.0)