mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
Revert "- model normals fix"
This worked in some instances but it also broke attenuated lights in other instances, and also caused the shaders to fail to compile on Mac.
This reverts commit 679518f8e5
.
This commit is contained in:
parent
9dea7cbaf9
commit
7652fd7ee0
1 changed files with 2 additions and 14 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue