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

Implement MSAA #1480

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Implement MSAA #1480

wants to merge 1 commit into from

Conversation

VReaperV
Copy link
Contributor

@VReaperV VReaperV commented Dec 27, 2024

Implements #532.

Add r_msaa. When set to > 0, an MSAA FBO will be created with that many samples. This FBO will be used for rendering, other than when it requires sampling from current render/depth image. When such rendering is required the MSAA FBO will be blit into the main FBO and vice versa, to resolve the MSAA texture.

plat23:
No MSAA:
unvanquished_2024-12-27_181225_000
MSAA 4x:
unvanquished_2024-12-27_181202_000

thunder:
No MSAA:
unvanquished_2024-12-27_181409_000
MSAA 4x:
unvanquished_2024-12-27_181430_000
MSAA 16x:
unvanquished_2024-12-27_181539_000
MSAA 32x:
unvanquished_2024-12-27_181602_000

Add `r_msaa`. When set to > 0, an MSAA FBO will be created with that many samples. This FBO will be used for rendering, other than when it requires sampling from current render/depth image. When such rendering is required the MSAA FBO will be blit into the main FBO and vice versa, to resolve the MSAA texture.
@VReaperV VReaperV added A-Renderer T-Feature-Request Proposed new feature labels Dec 27, 2024
@illwieckz
Copy link
Member

Nice! Finally some antialiasing!

It looks like when MSAA is enabled the heathaze from back surface is applied on front surfaces too:
https://imgsli.com/MzMyODgx

@illwieckz
Copy link
Member

My previous comment was about screenshots from the original post.

When I try the branch and enable MSAA I get a black screen (AMD Radeon with Mesa radeonsi driver).

@VReaperV
Copy link
Contributor Author

When I try the branch and enable MSAA I get a black screen (AMD Radeon with Mesa radeonsi driver).

That's interesting. Can you try with effects that use the main render target disabled, like heatHaze, bloom etc (or just use the lowest profile to make sure)? Also, does it work in the main menu?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants