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

Fixed GPUParticles2D preprocessing bug #78671

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SoulForMachine
Copy link
Contributor

@SoulForMachine SoulForMachine commented Jun 25, 2023

When awaiting on timer before switching to a scene containing the particles, GPUParticles2D is first preprocessed with an initial position, and then updated to the set position on the next frame. Details of the fix in my comment on the bug page.

Fixes #75723

…switching to a scene containing the particles.
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't reviewed in depth, but I'm pretty sure adding a flush here is not going to be an acceptable hack, it has too many implications. So adding a change request pre-emptively to block merging, but this can still be discussed and reviewed further as a good starting point for the proper fix.

@SoulForMachine
Copy link
Contributor Author

SoulForMachine commented Jun 26, 2023

I haven't reviewed in depth, but I'm pretty sure adding a flush here is not going to be an acceptable hack, it has too many implications. So adding a change request pre-emptively to block merging, but this can still be discussed and reviewed further as a good starting point for the proper fix.

Yes, I understand that this will have to be fixed properly at some point, but as I said in my comment on the bug page, this same function has this same hack in 2 other places already (message queue flush before xform notification flush), so I thought that we might want to do this for now so that particles preprocessing works fine in this scenario.

I'm still pretty new to the project, so I don't know at this point what the proper solution might be. The other two hacks were done by @reduz and I'm guessing he had a reason to leave it like that for quite a while. Maybe he could comment on this pr.

image

@akien-mga
Copy link
Member

Out of curiosity, I checked whether this would solve the seemingly related 3D equivalent of this bug #71935, but it doesn't seem to.

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.

Preprocess on GPU Particles not working correctly after await
3 participants