From 79dd1e26291b2cd9a627ec54b4022e5fee5f2a27 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Thu, 4 May 2023 19:57:28 +0100 Subject: [PATCH] Fixed ambient lighting --- assets/voxygen/shaders/include/light.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/voxygen/shaders/include/light.glsl b/assets/voxygen/shaders/include/light.glsl index a2b4e049ff..52b2c08fab 100644 --- a/assets/voxygen/shaders/include/light.glsl +++ b/assets/voxygen/shaders/include/light.glsl @@ -199,7 +199,7 @@ float lights_at(vec3 wpos, vec3 wnorm, vec3 /*cam_to_frag*/view_dir, vec3 mu, ve float computed_shadow = ShadowCalculationPoint(i, -difference, wnorm, wpos/*, light_distance*/); // directed_light += is_direct ? max(computed_shadow, /*LIGHT_AMBIANCE*/0.0) * direct_light : vec3(0.0); // Non-physically emulate ambient light nearby - float ambiance = (dot(-wnorm, direct_light_dir) * 0.5 + 0.5) * strength; + float ambiance = mix(0.05, 0.5, (dot(wnorm, direct_light_dir) + 1.0) * 0.5) * strength; #ifdef FIGURE_SHADER // Non-physical hack. Subtle, but allows lanterns to glow nicely // TODO: Make lanterns use glowing cells instead