AndroidJgltfViewer
                                
                                
                                
                                    AndroidJgltfViewer copied to clipboard
                            
                            
                            
                        Can I optimize this?
This code in class UniformGetterFactory 477 row
for (int j = 0; j < numJoints; j++)
        {
            NodeModel jointNodeModel = joints.get(j);
            
            Supplier<float[]> inverseBindMatrixSupplier = 
                inverseBindMatrixSuppliers.get(j);
            
            Supplier<float[]> jointMatrixSupplier = MatrixOps
                .create4x4(nodeModel.createGlobalTransformSupplier()).invert4x4()
                .multiply4x4(jointNodeModel.createGlobalTransformSupplier())
                .multiply4x4(inverseBindMatrixSupplier)
                .multiply4x4(bindShapeMatrixSupplier)
                .log("jointMatrix "+j, Level.FINE)
                .build();
            jointMatrixSuppliers.add(jointMatrixSupplier);
        }
.create4x4(nodeModel.createGlobalTransformSupplier()).invert4x4() It seems to me that this line calculates a matrix with the same result for each bone, and it requires significant resources. Can I take her calculation out of the loop?