1
0
Fork 0
forked from fte/fteqw

Added support for multipliers to the polygonOffset directive

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5439 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Eukara 2019-03-28 04:12:47 +00:00
parent ee9c9025a0
commit c1c0a861b8

View file

@ -1120,10 +1120,20 @@ static void Shader_Portal (parsestate_t *ps, char **ptr)
static void Shader_PolygonOffset (parsestate_t *ps, char **ptr)
{
int m;
char *token;
shader_t *shader = ps->s;
/*the q3 defaults*/
token = Shader_ParseString(ptr);
m = atoi(token);
if (m) {
shader->polyoffset.unit = -25 * m;
} else {
shader->polyoffset.unit = -25;
}
shader->polyoffset.factor = -0.05;
shader->polyoffset.unit = -25;
shader->flags |= SHADER_POLYGONOFFSET; //some backends might be lazy and only allow simple values.
}