mirror of
https://github.com/w23/xash3d-fwgs
synced 2025-01-18 23:00:01 +01:00
utils: mdldec: add fixed uv coords support.
This commit is contained in:
parent
203afda053
commit
9917cba8fc
@ -262,8 +262,16 @@ static void WriteTriangleInfo( FILE *fp, mstudiomodel_t *model, mstudiotexture_t
|
||||
Matrix3x4_VectorRotate( bonetransform[bone_index], studionorms[norm_index], norm );
|
||||
VectorNormalize( norm );
|
||||
|
||||
u = ( triverts[indices[i]]->s + 1.0f ) * s;
|
||||
v = 1.0f - triverts[indices[i]]->t * t;
|
||||
if( texture->flags & STUDIO_NF_UV_COORDS )
|
||||
{
|
||||
u = HalfToFloat( triverts[indices[i]]->s );
|
||||
v = -HalfToFloat( triverts[indices[i]]->t );
|
||||
}
|
||||
else
|
||||
{
|
||||
u = ( triverts[indices[i]]->s + 1.0f ) * s;
|
||||
v = 1.0f - triverts[indices[i]]->t * t;
|
||||
}
|
||||
|
||||
fprintf( fp, "%3i %f %f %f %f %f %f %f %f\n",
|
||||
bone_index,
|
||||
|
Loading…
x
Reference in New Issue
Block a user