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

Derived Motion Vectors broken between 4.3 dev 5 and dev6 #91758

Closed
mrjustaguy opened this issue May 9, 2024 · 6 comments · Fixed by #91799
Closed

Derived Motion Vectors broken between 4.3 dev 5 and dev6 #91758

mrjustaguy opened this issue May 9, 2024 · 6 comments · Fixed by #91799

Comments

@mrjustaguy
Copy link
Contributor

mrjustaguy commented May 9, 2024

Tested versions

Happens 4.3 Dev 6
Doesn't in 4.3 Dev 5 and earlier

System information

Windows 11, i3-10105f, RX6600 24.4.1, Forward+

Issue description

Derived Motion Vectors are Broken resulting in broken FSR2 Behaviors
When zooming out these are the results

image

Expected

image

Steps to reproduce

Enable FSR and move around, Looking at the Motion Vectors

Minimal reproduction project (MRP)

N/A

@DarioSamo
Copy link
Contributor

The blue motion vectors are derived from the camera and the depth value. Is it possible it's related to reverse depth? I'd try before and after this commit 69a4ff8.

@clayjohn clayjohn added this to the 4.3 milestone May 9, 2024
@clayjohn clayjohn moved this from Unassessed to Release Blocker in 4.x Release Blockers May 9, 2024
@clayjohn
Copy link
Member

clayjohn commented May 9, 2024

~I can't reproduce this issue. I've tested a basic scene with a plane mesh with Dev 5, Dev 6 and current master.

Can you upload an MRP that reproduces the issue? There must be something about your mesh that is impacting this

Notably, my motion vectors are also always yellow rather than blue. So I'm clearly not even triggering the same codepath you are~

Edit: I figured it out. This is only reproducible when using FSR2. TAA is not affected

@mrjustaguy
Copy link
Contributor Author

Yeah my bad, TAA is just it's regular old broken self due to it's own issues and hasn't regressed.. updated OP

@mrjustaguy mrjustaguy changed the title Motion Vectors broken between 4.3 dev 5 and dev6 Derived Motion Vectors broken between 4.3 dev 5 and dev6 May 10, 2024
@DarioSamo
Copy link
Contributor

The blue motion vectors are derived from the camera and the depth value. Is it possible it's related to reverse depth? I'd try before and after this commit 69a4ff8.

I've tested the commit before and after reverse Z and I can confirm this issue was introduced during that, and it seems to affect the derivation of the motion vectors from depth in particular that is used for FSR2. I'm not entirely sure why it breaks and how to fix it yet, but that's the starting point for this.

@DarioSamo
Copy link
Contributor

https://github.com/godotengine/godot/blob/master/servers/rendering/renderer_rd/shaders/effects/motion_vector_inc.glsl maybe?

That is independent of the math. I opened this PR that seemingly fixes the issue and it makes enough sense to me at least: #91799

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release Blocker
Development

Successfully merging a pull request may close this issue.

4 participants