summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-05-18 23:54:12 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-05-19 00:52:01 +0300
commitb2878acdb0035b0b8a2ad29ccd1ff817a6055709 (patch)
tree32c40afa8a9cfa22caeb4a0739b119cc6d81d87a
parent447f30781ef7a42a5f72971d713ea716befedf95 (diff)
#5786 Fix a case of unitialized override matrix
-rw-r--r--indra/newview/gltf/llgltfloader.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/gltf/llgltfloader.cpp b/indra/newview/gltf/llgltfloader.cpp
index 129c3a3b7a..54ad8c894b 100644
--- a/indra/newview/gltf/llgltfloader.cpp
+++ b/indra/newview/gltf/llgltfloader.cpp
@@ -1721,8 +1721,16 @@ glm::mat4 LLGLTFLoader::computeViewerBindMatrix(
}
const JointNodeData& node_data = node_iter->second;
+ if (!node_data.mIsOverrideValid)
+ {
+ // No valid override, falling back to rest matrix.
+ glm::mat4 fallback_bind = rotateGltfMatrixToViewerSpace(node_data.mGltfRestMatrix);
+ converted_bind_matrices[gltf_node_index] = fallback_bind;
+ return fallback_bind;
+ }
+
auto bind_iter = rotated_bind_matrices.find(gltf_node_index);
- if (bind_iter == rotated_bind_matrices.end() || !node_data.mIsOverrideValid)
+ if (bind_iter == rotated_bind_matrices.end())
{
converted_bind_matrices[gltf_node_index] = node_data.mOverrideRestMatrix;
return node_data.mOverrideRestMatrix;