-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Add support for EXT_multisampled_render_to_texture extension and use it for WebXR #22550
Conversation
After merging this, do you think we'll be able to remove the current renderbuffers code path any time soon? |
I suspect that almost all this code can go away once #22079 is implemented. |
Excellent! |
Thanks! |
Hmm, I can't think of the reason at the moment 🤔 |
Oh, maybe we should implement the stack approach in /cc @Mugen87 |
So, it's working in the webxr case, non-AA aliased and aliased using renderbuffers. |
@mrdoob I figured out why it wasn't working. The MSAA extension will discard the depth texture under certain circumstances. |
Is that a three.js bug? Oculus browser bug? Or WebGL spec bug? |
It's by design :-(
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_multisampled_render_to_texture2.txt |
@mrdoob The PR fixes it by using renderbuffers which don't suffer from this issue. |
The current approach via renderbuffers has the limitation that we can't apply foveation.
Foveation helps a lot for GPU limited scenes so we need to have support for both MSAA and foveation.
EXT_multisampled_render_to_texture is used under the hood in regular WebXR in the Oculus browser and this uses that extension so WebXR Layers (and potential other areas that needs MSAA) can use this.
The WebXR manager was also extended to support this.
This contribution is funded by Oculus.