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

Flip convention of motion vectors. #81074

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

DarioSamo
Copy link
Contributor

As seen in PR #80723, the motion vectors used by Godot seem to go against the convention seen in other solutions where the vector of a pixel points towards its position in the previous frame.

While there's no hard rule written about this, the closest thing I can probably cite is what FSR2 expects.

https://github.com/GPUOpen-Effects/FidelityFX-FSR2#providing-motion-vectors

Instead of flipping around the sign of the value sampled from the buffer every time we need it and making FSR2 use a negative scale, it's probably better in the long term to just flip the convention to match. Integrating this should make the vectors go in the correct direction in the video shown in the PR.

@DarioSamo DarioSamo requested a review from a team as a code owner August 28, 2023 12:38
@akien-mga akien-mga added this to the 4.2 milestone Aug 28, 2023
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 good!

Let's not cherrypick this change as it is done to support other refactoring around FSR2

@akien-mga akien-mga merged commit a6c72f9 into godotengine:master Aug 29, 2023
15 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.

3 participants