Use invariant gl_Position whenever its supported, even where ftransform is used, to try to get rid of coplanar depth fighting (eg: viewmodel alpha, volumetric fov, etc).

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5407 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2019-02-23 09:42:26 +00:00
parent 6502f02fbd
commit 4f3f6d78e3
1 changed files with 1 additions and 5 deletions

View File

@ -2251,12 +2251,8 @@ static GLhandleARB GLSlang_CreateShader (program_t *prog, const char *name, int
break;
case GL_VERTEX_SHADER_ARB:
GLSlang_GenerateInternal(&glsl, "#define VERTEX_SHADER\n");
#ifdef RTLIGHTS
if (!r_shadow_shadowmapping.ival && ver >= 120)
{
if (ver >= 120 || gl_config_gles) //invariant appeared in glsl 120, or glessl 100. rtlights, stencil shadows, multipass materials, fog volumes, blend-depth-masking all need invariant depth.
GLSlang_GenerateInternal(&glsl, "invariant gl_Position;\n");
}
#endif
if (gl_config.gles)
{
GLSlang_GenerateInternal(&glsl,