From 18759024143f81ce180590d87b91167adf07ded8 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 23 Jan 2018 23:59:58 +0100 Subject: [PATCH] - Do not flip the normal based on face direction --- wadsrc/static/shaders/glsl/main.fp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/shaders/glsl/main.fp b/wadsrc/static/shaders/glsl/main.fp index 71e973c17..6bc9f7a90 100644 --- a/wadsrc/static/shaders/glsl/main.fp +++ b/wadsrc/static/shaders/glsl/main.fp @@ -320,7 +320,7 @@ vec3 ApplyNormalMap() #define WITH_NORMALMAP_GREEN_UP //#define WITH_NORMALMAP_2CHANNEL - vec3 interpolatedNormal = normalize(gl_FrontFacing ? -vWorldNormal.xyz : vWorldNormal.xyz); + vec3 interpolatedNormal = normalize(vWorldNormal.xyz); vec3 map = texture(normaltexture, vTexCoord.st).xyz; #if defined(WITH_NORMALMAP_UNSIGNED) @@ -369,7 +369,7 @@ vec2 pointLightAttenuation(vec4 lightpos, float lightcolorA) float diffuseAmount = diffuseContribution(lightDirection, pixelnormal); #if defined(SPECULAR) - float specularAmount = blinnSpecularContribution(diffuseAmount, lightDirection, pixelnormal, 10.0, 0.12); + float specularAmount = blinnSpecularContribution(diffuseAmount, lightDirection, pixelnormal, 100.0, 200.0); return vec2(diffuseAmount, specularAmount) * attenuation; #else return vec2(attenuation * diffuseAmount, 0.0);