From 15fd13f83036ff781160957a21bb2d59771044bc Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 29 May 2024 16:56:39 -0500 Subject: #1530 Increase joint limit for GLTF Assets (#1582) * Migrate GLTF scene rendering to its own shaders * Add support for ambient occlusion map separate from metallic roughness map (or absent) * Use UBO's for GLTF joints * Better error handling of downloading GLTF assets --- indra/newview/llskinningutil.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llskinningutil.cpp') diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index 438b04ff39..4ffbd8a562 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -97,6 +97,12 @@ U32 LLSkinningUtil::getMeshJointCount(const LLMeshSkinInfo *skin) return llmin((U32)getMaxJointCount(), (U32)skin->mJointNames.size()); } +S32 LLSkinningUtil::getMaxGLTFJointCount() +{ + // this is the maximum number of 3x4 matrices than can fit in a UBO + return gGLManager.mMaxUniformBlockSize / 48; +} + void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin) { if (skin->mInvalidJointsScrubbed) -- cgit v1.2.3 From b42f9d836b4c0f7fbd4bdae1734021e2a09fdbe8 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 1 Jun 2024 15:49:26 +0200 Subject: Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings --- indra/newview/llskinningutil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llskinningutil.cpp') diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index 438b04ff39..bb4917f347 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -194,7 +194,7 @@ void LLSkinningUtil::checkSkinWeights(LLVector4a* weights, U32 num_vertices, con void LLSkinningUtil::scrubSkinWeights(LLVector4a* weights, U32 num_vertices, const LLMeshSkinInfo* skin) { - const S32 max_joints = skin->mJointNames.size(); + const S32 max_joints = static_cast(skin->mJointNames.size()); for (U32 j=0; jmJointNames.size(); + S32 num_joints = static_cast(skin->mJointNames.size()); if (num_verts > 0 && vol_face.mWeights && num_joints > 0) { initJointNums(const_cast(skin), avatar); -- cgit v1.2.3 From c0fad3028fd55c2067ce6a0ae4382cffe1014284 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 10 Jun 2024 16:42:43 +0200 Subject: Re-enable compiler warnings C4018, C4100, C4231 and C4506 --- indra/newview/llskinningutil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llskinningutil.cpp') diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index bb4917f347..52bd6a0315 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -131,7 +131,7 @@ void LLSkinningUtil::initSkinningMatrixPalette( LLMatrix4a world[LL_CHARACTER_MAX_ANIMATED_JOINTS]; - for (U32 j = 0; j < count; ++j) + for (S32 j = 0; j < count; ++j) { S32 joint_num = skin->mJointNums[j]; LLJoint *joint = avatar->getJoint(joint_num); -- cgit v1.2.3