Permalink
Browse files

renderer2: fix deforms

  • Loading branch information...
thunderpwn authored and IR4T4 committed Dec 5, 2018
1 parent 8e6fb6a commit ad74d7cb28f3ebf347e46bb2bdbe2a307a456d4d
Showing with 19 additions and 14 deletions.
  1. +19 −14 src/renderer2/tr_shade_calc.c
@@ -966,24 +966,29 @@ static void Autosprite2Deform(void)
*/
qboolean ShaderRequiresCPUDeforms(const shader_t *shader)
{
if (shader->numDeforms == 0)
if(shader->numDeforms)
{
return qfalse;
}
if (shader->numDeforms == 1)
{
const deformStage_t *ds = &shader->deforms[0];
switch (ds->deformation)
if (shader->numDeforms > 1)
{
case DEFORM_WAVE:
case DEFORM_BULGE:
return (backEnd.refdef.floatTime != tess.shaderTime); // seems both are always equal ..
default:
return qtrue;
return qtrue;
}
else
{
const deformStage_t *ds = &shader->deforms[0];
switch (ds->deformation)
{
case DEFORM_WAVE:
case DEFORM_BULGE:
case DEFORM_MOVE:
return qfalse;
default:
return qtrue;
}
}
}
return qfalse;
}
/**

0 comments on commit ad74d7c

Please sign in to comment.