Browse Source

ref_soft: Fix hang on big texcoords

pull/2/head
mittorn 6 years ago
parent
commit
714084bf5b
  1. 8
      r_triapi.c

8
r_triapi.c

@ -228,6 +228,12 @@ TriTexCoord2f @@ -228,6 +228,12 @@ TriTexCoord2f
void TriTexCoord2f( float u, float v )
{
//pglTexCoord2f( u, v );
u = fmod(u, 10);
v = fmod(v, 10);
if( isnan(u) )
u = 0;
if( isnan(v))
v = 0;
while( u < 0 )
u = u + 1;
while( v < 0 )
@ -237,6 +243,8 @@ void TriTexCoord2f( float u, float v ) @@ -237,6 +243,8 @@ void TriTexCoord2f( float u, float v )
u = u - 1;
while( v > 1 )
v = v - 1;
s = r_affinetridesc.skinwidth * bound(0.01,u,0.99);
t = r_affinetridesc.skinheight * bound(0.01,v,0.99);
}

Loading…
Cancel
Save