From 6dbeda3267a6297aa3d1ae9854a767d8b97323d2 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Wed, 25 Sep 2019 13:42:56 +0100 Subject: [PATCH] Better light attenuation --- 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 42b1cbeaa9..81f67e3cce 100644 --- a/assets/voxygen/shaders/include/light.glsl +++ b/assets/voxygen/shaders/include/light.glsl @@ -43,7 +43,7 @@ vec3 light_at(vec3 wpos, vec3 wnorm) { // Pre-calculate difference between light and fragment vec3 difference = light_pos - wpos; - float strength = attenuation_strength(difference); + float strength = pow(attenuation_strength(difference), 0.6); // Multiply the vec3 only once vec3 color = srgb_to_linear(L.light_col.rgb) * (strength * L.light_col.a);