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

WebXR Fixed Foveation #6078

Merged
merged 3 commits into from Feb 22, 2024
Merged

Conversation

Maksims
Copy link
Contributor

@Maksims Maksims commented Feb 21, 2024

The developer can provide a fixed foveation level value (0..1). Underlying rendering system will change the resolution of a framebuffer on the edges of the screens, that way it can improve the rendering performance of fragment shaders, as fewer details will be rendered on the edges.

New APIs:

// pc.XrManager
xr.fixedFoveation // (number|null) a value that can be set and read during an active XR session

Caveat:

Currently, the PlayCanvas engine renders into the intermediate buffer, resolves MSAA and then blits it to the back buffer. With such behaviour, the foveation will not work as the intermediate buffer is not foveated. So currently it only works if no anti-aliasing is enabled for rendering, that way engine renders directly into the back buffer and foveation is beneficial.

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

@mvaligursky mvaligursky merged commit 5c5fe16 into playcanvas:main Feb 22, 2024
7 checks passed
@Maksims Maksims deleted the webxr-fixedfoveation branch February 22, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants