From 593f462ec540a833ea7aa23fc22c1097f066d2a2 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune <vljn@ovi.com> Date: Fri, 21 Nov 2014 02:09:00 +0100 Subject: [PATCH] Revert "Use color for specular" This reverts commit fcba1dab86eb785ae366fef338ef31062f6f9540. --- data/shaders/utils/getSpecular.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/shaders/utils/getSpecular.frag b/data/shaders/utils/getSpecular.frag index 2ed28e6d4..64f07fea0 100644 --- a/data/shaders/utils/getSpecular.frag +++ b/data/shaders/utils/getSpecular.frag @@ -3,10 +3,10 @@ vec3 getSpecular(vec3 normal, vec3 eyedir, vec3 lightdir, vec3 color, float roughness) { // Half Light View direction - float f0 = 0.040; + vec3 f0 = vec3(0.040); vec3 H = normalize(eyedir + lightdir); float NdotH = max(0., dot(normal, H)); float normalisationFactor = (roughness + 2.) / 8.; - vec3 FresnelSchlick = color * (f0 + (1.0f - f0) * pow(1.0f - max(0., (dot(eyedir, H))), 5)); + vec3 FresnelSchlick = f0 + (1.0f - f0) * pow(1.0f - max(0., (dot(eyedir, H))), 5); return max(pow(NdotH, roughness) * FresnelSchlick * normalisationFactor, vec3(0.)); } \ No newline at end of file