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: TAA smears Skyboxes #67332

Open
Tracked by #69494
unfa opened this issue Oct 13, 2022 · 4 comments
Open
Tracked by #69494

Vulkan: TAA smears Skyboxes #67332

unfa opened this issue Oct 13, 2022 · 4 comments

Comments

@unfa
Copy link

unfa commented Oct 13, 2022

Godot version

v4.0.beta.custom_build [ca25c6e]

System information

Arch Linux, KDE, AMD RX6800XT, Mesa, Vulkan, Clustered+

Issue description

Temporal Anti-Aliasing seems to recieve no motion vectors for skybox textures, resulting in motion smearing when rotating the camera.

This is especially aparrent with textures detailed enough so that TAA's blending threshold doesn't kick in:

Here's an example with PhysicalSky using a spreckly FastNoiseLite texture in the "Night Sky" slot to imitate stars. ooking around causes massive smearing. Note the difference between the textured ground and the sky - both were moving the same way on-screen.

Screenshot_20221013_014914

Steps to reproduce

Use a very grainy, 4x2K resolution texture and put it either into PhysicalSky's Night Sky rtexture slot or into PanoramicSky.

Minimal reproduction project

Here's a simple project that demonstrates this with a rotating camera:

TAA vs Skybox.zip

I've also added an alpha-blended sprite to demonstrate how transparency overwrites motion vectors for anything that's behind it regardless of alpha value.

@clayjohn clayjohn added this to the 4.0 milestone Oct 13, 2022
@clayjohn
Copy link
Member

You mention motion vectors a few times in this Issue, are you seeing motion vectors when you turn the motion vector debug mode on? The skybox should not generate any motion vectors at all, so if it is, that could point us in the direction of the bug.

@unfa
Copy link
Author

unfa commented Oct 13, 2022

@clayjohn I tried that but I saw only pure blackness.

@Calinou Calinou changed the title TAA smears Skyboxes Vulkan: TAA smears Skyboxes Oct 13, 2022
@clayjohn clayjohn modified the milestones: 4.0, 4.x Feb 23, 2023
@EMBYRDEV
Copy link
Contributor

You mention motion vectors a few times in this Issue, are you seeing motion vectors when you turn the motion vector debug mode on? The skybox should not generate any motion vectors at all, so if it is, that could point us in the direction of the bug.

The sky shader doesn't appear to do any sort of TAA handling and isn't even being fed the previous frame's data yet.

@ValeronSA
Copy link

ValeronSA commented Jan 22, 2024

Motion vectors are not calculated when the camera is rotated, which is why the sky is blurred when rotated. At the same time, for FSR2 the sky is calculated correctly.
image

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