mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 07:57:52 +00:00
- workaround buggy preprocessor in old AMD OpenGL drivers
This commit is contained in:
parent
fb51b5d137
commit
c28e56f9e8
1 changed files with 13 additions and 11 deletions
|
@ -21,21 +21,12 @@ layout(location = 6) out vec4 vEyeNormal;
|
||||||
#ifdef NO_CLIPDISTANCE_SUPPORT
|
#ifdef NO_CLIPDISTANCE_SUPPORT
|
||||||
layout(location = 7) out vec4 ClipDistanceA;
|
layout(location = 7) out vec4 ClipDistanceA;
|
||||||
layout(location = 8) out vec4 ClipDistanceB;
|
layout(location = 8) out vec4 ClipDistanceB;
|
||||||
#define ClipDistance0 ClipDistanceA.x
|
|
||||||
#define ClipDistance1 ClipDistanceA.y
|
|
||||||
#define ClipDistance2 ClipDistanceA.z
|
|
||||||
#define ClipDistance3 ClipDistanceA.w
|
|
||||||
#define ClipDistance4 ClipDistanceB.x
|
|
||||||
#else
|
|
||||||
#define ClipDistance0 gl_ClipDistance[0]
|
|
||||||
#define ClipDistance1 gl_ClipDistance[1]
|
|
||||||
#define ClipDistance2 gl_ClipDistance[2]
|
|
||||||
#define ClipDistance3 gl_ClipDistance[3]
|
|
||||||
#define ClipDistance4 gl_ClipDistance[4]
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
|
float ClipDistance0, ClipDistance1, ClipDistance2, ClipDistance3, ClipDistance4;
|
||||||
|
|
||||||
vec2 parmTexCoord;
|
vec2 parmTexCoord;
|
||||||
vec4 parmPosition;
|
vec4 parmPosition;
|
||||||
|
|
||||||
|
@ -138,5 +129,16 @@ void main()
|
||||||
ClipDistance4 = 1.0;
|
ClipDistance4 = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NO_CLIPDISTANCE_SUPPORT
|
||||||
|
ClipDistanceA = vec4(ClipDistance0, ClipDistance1, ClipDistance2, ClipDistance3);
|
||||||
|
ClipDistanceB = vec4(ClipDistance4, 0.0, 0.0, 0.0);
|
||||||
|
#else
|
||||||
|
gl_ClipDistance[0] = ClipDistance0;
|
||||||
|
gl_ClipDistance[1] = ClipDistance1;
|
||||||
|
gl_ClipDistance[2] = ClipDistance2;
|
||||||
|
gl_ClipDistance[3] = ClipDistance3;
|
||||||
|
gl_ClipDistance[4] = ClipDistance4;
|
||||||
|
#endif
|
||||||
|
|
||||||
gl_PointSize = 1.0;
|
gl_PointSize = 1.0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue