From 5018d3e65018d16eb1a302de4e752d39eb1fae59 Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 22 Oct 2021 22:27:14 +0000 Subject: [PATCH] Fix crash from rtlights on inefficient deformVertexes shaders in wastes. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6085 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_shader.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/gl/gl_shader.c b/engine/gl/gl_shader.c index 26dfd08e0..d59e7926d 100644 --- a/engine/gl/gl_shader.c +++ b/engine/gl/gl_shader.c @@ -5668,6 +5668,10 @@ done:; Shader_Programify(ps); } + if( s->numdeforms || + s->sort == SHADER_SORT_PORTAL || //q3-style portals (needed for pvs info) + s->flags & (SHADER_HASREFLECT|SHADER_HASREFRACT)) //water effects (needed for pvs info) + s->flags |= SHADER_NEEDSARRAYS; if (s->prog) { struct @@ -5763,10 +5767,6 @@ done:; #endif s->passes->numMergedPasses = s->numpasses; } - else if(s->numdeforms || - s->sort == SHADER_SORT_PORTAL || //q3-style portals (needed for pvs info) - s->flags & (SHADER_HASREFLECT|SHADER_HASREFRACT)) //water effects (needed for pvs info) - s->flags |= SHADER_NEEDSARRAYS; else { for (i = 0; i < s->numpasses; i++)