-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
WebGL2: Added Support for Multisampled Renderbuffers. #15541
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
Conversation
|
What happens if someone uses |
|
For now, I would not implement a fallback FYI: If you still try to use |
|
Okay, d9c90c0 ensures that no runtime errors occur anymore. Instead, a warning is logged when |
|
Thanks! |
|
Yay 🎉 🙌 ! |
|
Awesome! Would it be difficult to do the same for WebGLRenderTargetCube? |
|
I'm not sure how much effort it takes but I think it should be possible. What is your use case for this? Normally, multisampled FBOs are mainly used in context of post-processing. |
|
I use WebGLRenderTargetCube to simulate video projectors in THREE.js. The geometry that is being projected onto looks up its color according to the rendertarget texture. Your addition of multisampling renderbuffers allows better quality at lower resolutions and is much faster than manual MSAA. However, while a simple WebGLRenderTarget is sufficient for pinhole like projectors, I use a RenderTargetCube to project larger field of views using multiple projectors. The scenery is basically surrounded by a large envMap that is being dynamically rendered to using a RenderTargetCube. (Think of it like a planetarium). Having a WebGLMultisampleRenderTargetCube would improve the rendering quality tremendously. |
|
@carstenschwede Would you like to create a new issue for it? |
|
@Mugen87 Would you like to explore removing That way |
|
Okay, I'll have a look at this 👍 . |
|
Awesome! Just to be sure: This enables multisampling for |
|
Thanks, I see, so API preparation for later support. |
This PR adds support for multisampled renderbuffers. If you are using WebGL2, you can now perform "render-to-texture" and have an antialiasing render result. A post-process AA like FXAA is not necessary anymore.
Thanks to @mattdesl for his initial PR #8120