diff --git a/wadsrc/static/shaders/glsl/main.fp b/wadsrc/static/shaders/glsl/main.fp index a46a09beac..15af579a90 100644 --- a/wadsrc/static/shaders/glsl/main.fp +++ b/wadsrc/static/shaders/glsl/main.fp @@ -5,8 +5,8 @@ layout(location = 1) in vec4 vColor; layout(location = 2) in vec4 pixelpos; layout(location = 3) in vec3 glowdist; layout(location = 4) in vec3 gradientdist; -layout(location = 5) in vec4 vWorldNormalOrig; -layout(location = 6) in vec4 vEyeNormalOrig; +layout(location = 5) in vec4 vWorldNormal; +layout(location = 6) in vec4 vEyeNormal; layout(location = 9) in vec3 vLightmap; #ifdef NO_CLIPDISTANCE_SUPPORT @@ -20,9 +20,6 @@ layout(location=1) out vec4 FragFog; layout(location=2) out vec4 FragNormal; #endif -vec4 vWorldNormal; -vec4 vEyeNormal; - struct Material { vec4 Base; @@ -723,15 +720,6 @@ void main() if (ClipDistanceA.x < 0 || ClipDistanceA.y < 0 || ClipDistanceA.z < 0 || ClipDistanceA.w < 0 || ClipDistanceB.x < 0) discard; #endif - // Flip normal if it is facing away from the camera - vWorldNormal = vWorldNormalOrig; - vEyeNormal = vEyeNormalOrig; - if (dot(uCameraPos.xyz - pixelpos.xyz, vWorldNormal.xyz) < 0) - { - vWorldNormal.xyz = -vWorldNormal.xyz; - vEyeNormal.xyz = -vEyeNormal.xyz; - } - #ifndef LEGACY_USER_SHADER Material material;