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

Sprite rendering should be based around layers not sprites #4803

Open
metalgearsloth opened this issue Jan 3, 2024 · 0 comments · May be fixed by #4917
Open

Sprite rendering should be based around layers not sprites #4803

metalgearsloth opened this issue Jan 3, 2024 · 0 comments · May be fixed by #4917

Comments

@metalgearsloth
Copy link
Contributor

Consider that sprite rendering, at least from the cpu end, is a similar problem space to physics + dynamictrees:

Ideally:

  • Each drawdepth is on its own dynamictree. We have far fewer of those than collision layers so we would probably only have 20 or 30 and not 100.
  • When we get sprites to draw we can sort per dynamictree and not globally which is much faster and means we can dispatch sprites for drawing much faster.
  • Cleaner separation when we want to do overlays in-between drawdepths.
  • Per-layer drawdepths is useful in some rare cases where you really don't want 2 entities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant