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
Batched rendering of particles #13834
Conversation
Thanks so much! |
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.
Minor concern: Won't this mess with particle-particle blending? (Since this can at best sort particle vertices per-texture).
(Only a minor concern because (1) particle-nonparticle blending doesn't work anyways and (2) particle-particle blending has only been fixed recently-ish (5.6 IIRC) (3) acceptable performance has priority (4) particle-particle blending will still work among particles that use the same texture or that use order-independent blend modes)
* Initialize default_particle_texture explicitly * Add override keyword where necessary
I've had this enabled for a few days. Observed nothing undue. Works. |
Note for devs: if there are no major reviews, this PR can still get approved and merged |
Have you tested particle-particle blending among semitransparent particles with different textures? (This can be safely enabled for particles that don't use order-dependent blending. There could also be an option for particles that do need blending - but only among particles of the same kind - to turn this on, sacrificing visual correctness for performance. But as said this can probably be considered minor anyways...) |
No I have not. |
Here's a rebased version, plus some small code quality improvements, like |
@Desour if you confirm you want to take care of this PR, feel free to close this one |
I'd prefer if someone else adopts it. |
Hello there core dev teams, this is my child now. I have adopted it. Please give me the rights or whatever adoption requires |
@jordan4ibanez you just need to open a new pr for it |
@jordan4ibanez Have you considered taking the rebased branch I've linked up there? It was meant to be used by the adopter. (As there seems to be quite some confusion on why I didn't adopt this, let me clarify: Much of the work needed for this PR, i.e. testing that everything still works, especially with alpha blending issues and whatnot, is still left to be done. And this PR is not high on my already too long priority list.) |
Hello desour, please comment any issues on the new pr, thank you |
Improves performance by rendering particles with the same texture as a single mesh buffer. Possibly resolves #1414
Puts limits on how many particles can be drawn:
Example results:
AMD Renoir
34K particles on the screen
13 FPS on master
45 FPS on the branch.
To do
This PR is Ready for Review.
How to test
Minimal test:
Example code for performance test: