-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vectorize the covariance calculation #6098
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, but even cleaner would be
vec3 M0 = scale.x * rot[0];
vec3 M1 = scale.y * rot[1];
vec3 M2 = scale.z * rot[2];
covA = vec3(
dot(M0, M0),
dot(M0, M1),
dot(M0, M2)
);
covB = vec3(
dot(M1, M1),
dot(M1, M2),
dot(M2, M2)
);
Thanks for the suggestion! I've implemented the change and it looks much cleaner now. Appreciate your feedback! |
Hi @kemchenj , did you mean to close this PR? Looks like a useful simplification. |
Hi, yes, I did intend to close the PR because I realized the modification here was not correct. I was planning to fix it before reopening the PR, but it seems it has already been merged... |
Hi.. I'm happy to accept a new PR that fixes it :) |
I opened a new PR to fix this #6100 🫣 |
I confirm I have read the contributing guidelines and signed the Contributor License Agreement.