-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Fix for multimesh motion vector corruption #95270
Fix for multimesh motion vector corruption #95270
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good to me and makes sense. I haven't personally tested it but I discussed the change with @Lssikkes and we agreed this seemed like a good way to fix the issue.
I'll wait for someone else to verify and make sure it doesn't cause regressions. This could make it either for 4.3 or wait to be cherry-picked for 4.3.1.
94d2146
to
d6eaa61
Compare
… state and filling both halves of buffer
515b65c
to
52cd5ac
Compare
Thank you AThousandShips & Dario. Made the style changes. |
This is going on on godot 4.3 stable Compiled version" |
@ciso507 This PR hasn't been merged yet, so it's expected that you might still see this bug in 4.3.stable. |
Thanks! And congrats for your first merged Godot contribution 🎉 |
Case#1: Case#2: (I created a new project for this and i couldn't reproduce it) |
Awesome, thank you so much :) I think there are some issues remaining, I saw one case where just custom data/color updates could still cause confusion with the buffers, and the colors would start to flutter between state 1 and 2. I think I'll make a test scene soon to try to test all these different permutations of being able to use MultiMesh, and see which combination of things are still causing issues. This MR already improves things by quite a bit though.
This might be a separate issue - is 2D using motion vectors? Fullscreen motion blur? |
@Lssikkes @akien-mga
|
@akien-mga hey it seems that it gets fixed if i change the timer.wait_time ... that sends the signal for the width and height to change the frames, well this doesnt make sense to me that it gets fixed like this but its fixed. |
Cherry-picked for 4.3.1. |
Multimeshes can get corrupted when using multimesh_set_buffer, and subsequently using the individual set API afterwards. This commit fixes the issue by making sure motion vectors are always disabled after resetting the instance count, and filling both halves of the buffer on initial multimesh_set_buffer motion vector upgrade.