-
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
Fix 3D Gaussian Splat rendering in VR #6896
Conversation
|
||
// adjust viewport for stereoscopic VR sessions | ||
if (this.cameras.length > 0) { | ||
const camera = this.cameras[0]; |
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.
we should probably loop over all cameras to see if any of these is xr. I suspect that if the shadows are used, the cameras[0] would be a shadow camera.
Even better, this should be called per camera somehow, instead of globally once per frame - in case the splat is rendered to a texture as well as main framebuffer.
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.
Yeah, it's not great and almost certainly needs to be reworked.
Nice, Does this also add support for multiple cameras generally or is it just a VR fix. Right now it does the culling and ordering for only the last camera, its acutally quite a cool effect but not one i think is intentional ;) |
It does not handle it, all that still works just for a single camera. That is actually similar to particle system (when CPU sorting is used) |
Fixes #6053
Without fix:
With fix:
Thank you to @Maksims for the suggestion for fixing this. 🙏
I confirm I have read the contributing guidelines and signed the Contributor License Agreement.