diff --git a/src/shader/shaders.c b/src/shader/shaders.c index 14a1102..bcda30d 100644 --- a/src/shader/shaders.c +++ b/src/shader/shaders.c @@ -179,7 +179,10 @@ internal M4x4f get_projection_matrix(ProjectionType projection_type) { } internal f32 get_intensity(const V3f *normal) { - f32 intensity = dot_v3((*normal), g_light_dir); + V3f light = g_light_dir; + normalise_v3(light); + + f32 intensity = dot_v3((*normal), light); if (intensity < 0.0f) { intensity = 0.001f; }