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

MSAA? #12

Closed
VinnyVicious opened this issue Jul 14, 2022 · 3 comments
Closed

MSAA? #12

VinnyVicious opened this issue Jul 14, 2022 · 3 comments

Comments

@VinnyVicious
Copy link

Results are very noisy without any filtering. Is it possible to add MSAA to this rendering technique?

image

@pezcode
Copy link
Owner

pezcode commented Jul 14, 2022

It looks like your textures don't have mipmaps. MSAA only helps with anti-aliasing along triangle edges.

But yes, you can enable MSAA by creating the intermediate framebuffer attachments with MSAA. Try adding BGFX_TEXTURE_RT_MSAA_X4 to the createTexture2D() calls here:

bgfx::FrameBufferHandle Renderer::createFrameBuffer(bool hdr, bool depth)

(Note: This won't work correctly for the deferred renderer, you'd need some post-process anti-aliasing there)

@VinnyVicious
Copy link
Author

Oh, that does the trick:

image

Thank you, you're a genius. :)

@VinnyVicious
Copy link
Author

With mips:
image

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

No branches or pull requests

2 participants