From 1e01e4d667c4d1b92419c786de151135a19aa4cf Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Wed, 21 Jul 2021 12:37:02 -0400 Subject: [PATCH] I don't think it's needed to multiply by normal length in shader here --- src/default_shaders.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/default_shaders.cpp b/src/default_shaders.cpp index 13c7eb4..afeecea 100644 --- a/src/default_shaders.cpp +++ b/src/default_shaders.cpp @@ -62,7 +62,8 @@ void main() for (uint i = 0u; i < num_lights; i++) { vec3 surfaceToLight = lights[i].position - fragPosition; - float brightness = dot(normal, surfaceToLight) / (length(surfaceToLight) * length(normal)); + //float brightness = dot(normal, surfaceToLight) / (length(surfaceToLight) * length(normal)); + float brightness = dot(normal, surfaceToLight) / length(surfaceToLight); totalBrightness += brightness; }