From f38c24ad1765f39f620267c0a85e532cb851baac Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 2 Aug 2020 15:04:41 +0300 Subject: [PATCH] Actually use the light color in cooktorrance shader --- shaderlib/cooktorrance.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shaderlib/cooktorrance.glsl b/shaderlib/cooktorrance.glsl index e23f1219..85d7f4f3 100644 --- a/shaderlib/cooktorrance.glsl +++ b/shaderlib/cooktorrance.glsl @@ -113,7 +113,7 @@ vec3 cooktorrance_one_light_direct(vec3 normal, vec3 look, vec3 light, vec3 ligh vec3 k_diff = (1.0-k_spec)*(1.0-metalness); float denom = max(4.0*max(dot(normal, -look), 0.0)*max(dot(normal, light), 0.0), 0.001); - return max(dot(normal, light), 0.0)*(k_diff*lambert_diffuse(base_color)+k_spec*ndist*geom/denom); + return max(dot(normal, light), 0.0)*light_color*(k_diff*lambert_diffuse(base_color)+k_spec*ndist*geom/denom); } vec3 cooktorrance_lighting(vec3 normal, vec3 look, vec3 base_color, float metalness, float roughness) -- 2.45.2