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

Vulkan Clustered: TAA or FSR2 on a transparent viewport causes the viewport to turn opaque #69492

Open
Tracked by #69494
Calinou opened this issue Dec 2, 2022 · 3 comments

Comments

@Calinou
Copy link
Member

Calinou commented Dec 2, 2022

Godot version

4.0.beta7

System information

Fedora 36, Vulkan Forward Plus, AMD Radeon RX 6900 XT

Issue description

When enabling temporal antialiasing, the viewport becomes opaque if it's currently transparent.

This does not occur with FXAA and MSAA, both of which support transparent viewports (with some visible artifacts though).

TAA disabled TAA enabled
2022-12-02_15 15 36 2022-12-02_15 15 24

If it's not possible to support TAA on transparent viewports, I suggest making the transparent viewport property take priority (so it disables TAA), and print a warning if both TAA and transparent viewport are enabled.

Steps to reproduce

  • Enable Display > Window > Size > Transparent, Display > Window > Per Pixel Transparency > Allowed and Rendering > Transparent Background in the advanced Project Settings.
  • Notice how the editor 3D viewport (and the running project) features transparency.
  • Enable Use TAA in the Project Settings.
  • Notice how the editor 3D viewport (and the running project) loses transparency.

Minimal reproduction project

test_taa_transparent_viewport.zip

@viksl
Copy link
Contributor

viksl commented Feb 7, 2023

I can confirm this in case it's needed. Happened to me to just yesterday in beta17 win 10 with a subviewport.

@DarioSamo
Copy link
Contributor

From a brief look into it it seems like the TAA resolve step intentionally ignores the alpha component as it resolves the color, tonemapping, history, etc. It seems taking alpha into account would also expand the memory used during execution.

There is no obvious solution as to how to extend this in the shader as it'd need to use a separate path for mixing the alpha (to avoid tonemapping) and would probably need another variant of the shader to not cause a performance impact when transparent output isn't necessary (which is the more common use case).

Adding a warning and disabling TAA for this use case might be the more reasonable approach here.

@Ryhon0
Copy link

Ryhon0 commented Jul 14, 2024

Also seems to happen with FSR 2 enabled. FSR 1 works properly

@Calinou Calinou changed the title Vulkan Clustered: TAA on a transparent viewport causes the viewport to turn opaque Vulkan Clustered: TAA or FSR2 on a transparent viewport causes the viewport to turn opaque Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants