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

Do not use MSAA versions of textures on debug views. #91808

Merged
merged 1 commit into from
May 13, 2024

Conversation

DarioSamo
Copy link
Contributor

While working on debugging the motion vectors, I noticed the code will fail to work if MSAA is enabled in the viewport. This error also happens when trying to view the normal roughness buffer when MSAA is enabled.

Since the debug effects do not support sampling from Multisampled textures directly, and this is the only use case where these methods are called, the most effective solution is to only ever return the resolved versions of the textures, which are ready by the time the debug effects are drawn.

This issue is not a regression from any particular change as far as I can tell.

Fixes #62955.

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I double checked and indeed these are only used for debug drawing, so no reason to return the MSAA versions.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected. The issue no longer occurs on the same setup as in #62955 (comment).

The normal buffer view looks a bit strange when MSAA is enabled (it's also not smoothed out), but I guess not much can be done about this.

Disabled 2× MSAA 4× MSAA 8× MSAA
Screenshot_20240513_002134 Screenshot_20240513_002141 Screenshot_20240513_002149 Screenshot_20240513_002155

@akien-mga akien-mga merged commit c322a9b into godotengine:master May 13, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Vulkan: Normal buffer view broken when using MSAA on NVIDIA GPUs
5 participants