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:
parent
ee9c9025a0
commit
c1c0a861b8
1 changed files with 12 additions and 2 deletions
|
@ -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.
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue