mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
Fixed glTF2 bounding box calculation if GPU skinning is used
This commit is contained in:
parent
8b5dc677e3
commit
4258367037
2 changed files with 4 additions and 4 deletions
|
@ -239,7 +239,7 @@ MapPolygonMesh* MapPolygonMesh::ConvertFromMeshGltf( const gltfMesh_Primitive* p
|
|||
{
|
||||
uint16_t vec[4];
|
||||
|
||||
assert( sizeof( vec ) == (attrAcc->typeSize * 4) );
|
||||
assert( sizeof( vec ) == ( attrAcc->typeSize * 4 ) );
|
||||
|
||||
for( int i = 0; i < attrAcc->count; i++ )
|
||||
{
|
||||
|
@ -263,7 +263,7 @@ MapPolygonMesh* MapPolygonMesh::ConvertFromMeshGltf( const gltfMesh_Primitive* p
|
|||
uint8_t vec[4];
|
||||
for( int i = 0; i < attrAcc->count; i++ )
|
||||
{
|
||||
assert( sizeof( vec ) == (attrAcc->typeSize * 4) );
|
||||
assert( sizeof( vec ) == ( attrAcc->typeSize * 4 ) );
|
||||
|
||||
bin.Read( ( void* )( &vec[0] ), attrAcc->typeSize );
|
||||
bin.Read( ( void* )( &vec[1] ), attrAcc->typeSize );
|
||||
|
|
|
@ -1261,7 +1261,7 @@ idList<int> TransformVertsAndTangents_GLTF( idDrawVert* targetVerts, const int n
|
|||
|
||||
for( int j = 0; j < 4; j++ )
|
||||
{
|
||||
jointIds.AddUnique( base.color[0] );
|
||||
jointIds.AddUnique( base.color[j] );
|
||||
}
|
||||
|
||||
const float w0 = base.color2[0] * ( 1.0f / 255.0f );
|
||||
|
@ -1355,7 +1355,7 @@ void idRenderModelGLTF::UpdateSurface( const struct renderEntity_s* ent, const i
|
|||
__m128 maxX = vector_float_negInfinity;
|
||||
__m128 maxY = vector_float_negInfinity;
|
||||
__m128 maxZ = vector_float_negInfinity;
|
||||
for( int i = 0; i < jointIds.Num(); i++ )
|
||||
for( int i = 0; i < md5joints.Num(); i++ )
|
||||
{
|
||||
const idJointMat& joint = entJoints[i];
|
||||
__m128 x = _mm_load_ps( joint.ToFloatPtr() + 0 * 4 );
|
||||
|
|
Loading…
Reference in a new issue