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

Fix GPUParticles2D wrong lifetime draw order on first particle #55382

Closed

Conversation

ator-dev
Copy link
Contributor

Fix #50825

@akien-mga
Copy link
Member

Is that an issue in 3.x too, or only 4.0? And is it a problem for 3D particles?

@ator-dev
Copy link
Contributor Author

ator-dev commented Nov 27, 2021

@akien-mga In 3.x the Index sorting mode works the same way [correctly], Lifetime works correctly, and ReverseLifetime doesn't exist; I can't find the equivalent code though, it seems to work in quite a different way (seemingly, in 3.x draw_order is implemented in C++ instead of GLSL).
I've tried to test GPUParticles3D but can't work out how to test the draw order - I can only make the normal distance-based mesh rendering work without causing lots of errors. Would you mind telling me how to do it or testing it yourself please?

By the way, I just realised my commit is currently flawed. While it fixes the problem, when you open or run a scene already containing a particle emitter, there is a visual glitch (where new particles appear on top for a split second) that continues until you change its speed_scale property - even to the same value. I have no idea what's causing this and can't work out a fix as of yet.

@clayjohn
Copy link
Member

Thank you for investigating this bug and attempting a fix. While evaluating your fix, I came up with a different solution that seems to avoid creating new artifacts.

Superseded by #55382

@clayjohn clayjohn closed this Feb 14, 2023
@clayjohn clayjohn removed this from the 4.0 milestone Feb 14, 2023
@ator-dev ator-dev deleted the fix-lifetime-draw-order branch February 15, 2023 00:40
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.

Lifetime draw order in GPUParticles2D is wrong at the beginning
5 participants