mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
renders: support SURF_N64_UV
This commit is contained in:
parent
f7ec7d268e
commit
42b4a61794
4 changed files with 24 additions and 0 deletions
|
@ -196,6 +196,12 @@ LM_BuildPolygonFromSurface(model_t *currentmodel, msurface_t *fa)
|
|||
t = DotProduct(vec, fa->texinfo->vecs[1]) + fa->texinfo->vecs[1][3];
|
||||
t /= fa->texinfo->image->height;
|
||||
|
||||
if (fa->texinfo->flags & SURF_N64_UV)
|
||||
{
|
||||
s *= 0.5;
|
||||
t *= 0.5;
|
||||
}
|
||||
|
||||
VectorAdd(total, vec, total);
|
||||
VectorCopy(vec, vert->pos);
|
||||
vert->texCoord[0] = s;
|
||||
|
|
|
@ -180,6 +180,12 @@ LM_BuildPolygonFromSurface(gl3model_t *currentmodel, msurface_t *fa)
|
|||
t = DotProduct(vec, fa->texinfo->vecs[1]) + fa->texinfo->vecs[1][3];
|
||||
t /= fa->texinfo->image->height;
|
||||
|
||||
if (fa->texinfo->flags & SURF_N64_UV)
|
||||
{
|
||||
s *= 0.5;
|
||||
t *= 0.5;
|
||||
}
|
||||
|
||||
VectorAdd(total, vec, total);
|
||||
VectorCopy(vec, vert->pos);
|
||||
vert->texCoord[0] = s;
|
||||
|
|
|
@ -180,6 +180,12 @@ LM_BuildPolygonFromSurface(gl4model_t *currentmodel, msurface_t *fa)
|
|||
t = DotProduct(vec, fa->texinfo->vecs[1]) + fa->texinfo->vecs[1][3];
|
||||
t /= fa->texinfo->image->height;
|
||||
|
||||
if (fa->texinfo->flags & SURF_N64_UV)
|
||||
{
|
||||
s *= 0.5;
|
||||
t *= 0.5;
|
||||
}
|
||||
|
||||
VectorAdd(total, vec, total);
|
||||
VectorCopy(vec, vert->pos);
|
||||
vert->texCoord[0] = s;
|
||||
|
|
|
@ -179,6 +179,12 @@ LM_BuildPolygonFromSurface(model_t *currentmodel, msurface_t *fa)
|
|||
t = DotProduct(vec, fa->texinfo->vecs[1]) + fa->texinfo->vecs[1][3];
|
||||
t /= fa->texinfo->image->height;
|
||||
|
||||
if (fa->texinfo->flags & SURF_N64_UV)
|
||||
{
|
||||
s *= 0.5;
|
||||
t *= 0.5;
|
||||
}
|
||||
|
||||
VectorAdd(total, vec, total);
|
||||
VectorCopy(vec, vert->pos);
|
||||
vert->texCoord[0] = s;
|
||||
|
|
Loading…
Reference in a new issue