Skip to content
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

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Fix 3D Gaussian Splat rendering in VR #6896

merged 1 commit into from
Aug 28, 2024

Conversation

willeastcott
Copy link
Contributor

@willeastcott willeastcott commented Aug 28, 2024

Fixes #6053

Without fix:

image

With fix:

image

Thank you to @Maksims for the suggestion for fixing this. 🙏

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

@willeastcott willeastcott merged commit 870e863 into main Aug 28, 2024
8 checks passed
@willeastcott willeastcott deleted the fix-vr-splats branch August 28, 2024 19:08

// adjust viewport for stereoscopic VR sessions
if (this.cameras.length > 0) {
const camera = this.cameras[0];
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@MAG-AdrianMeredith
Copy link
Contributor

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 ;)

@mvaligursky
Copy link
Contributor

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)

slimbuck pushed a commit that referenced this pull request Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: xr XR related issue bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GSplats stereoscopic rendering (viewport size issues)
4 participants