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

Resolve msaa when needed #177

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

Resolve msaa when needed #177

wants to merge 1 commit into from

Conversation

slimbuck
Copy link
Member

@slimbuck slimbuck commented May 3, 2022

The viewer was resolving color & depth buffers every frame, even though depth was not always needed.

This PR updates the viewer to only resolve color buffers every frame and then resolve depth buffer when it's required.

This change saves 3.0ms per frame when rendering 4xMSAA at 1440p on macbook ATI hardware.

@slimbuck slimbuck added the enhancement New feature or request label May 3, 2022
@slimbuck slimbuck requested a review from a team May 3, 2022 15:00
@slimbuck slimbuck self-assigned this May 3, 2022
@mvaligursky
Copy link
Contributor

Ideally we would not resolve depth .. as this is the only code at the moment that does it, and it's not compatible with WebGl1 nor WebGPU. I'd prefer we remove depth parameter to RenderTarget.resolve and implement this feature using SceneDepth.

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

Successfully merging this pull request may close these issues.

None yet

2 participants