Skip to content

New spritelist rendering system - Support for non-geo shader system#2699

Merged
einarf merged 21 commits intodevelopmentfrom
sprite-no-gs
May 29, 2025
Merged

New spritelist rendering system - Support for non-geo shader system#2699
einarf merged 21 commits intodevelopmentfrom
sprite-no-gs

Conversation

@einarf
Copy link
Member

@einarf einarf commented May 25, 2025

Initial work ...

This needs a bit of thinking because we are using index buffer.

@einarf
Copy link
Member Author

einarf commented May 26, 2025

So far this experiment is doing the follwing.

  • A new SpriteListData base class for storing all gpu resources (buffers, geometry, program)
  • A SpriteListBufferData implementation with the the standard geo shader and buffers

Next step: Attempt to create texture storage version using a program without geo shader.

NOTE: The single sprite shader also needs to be looked at. Likely we just pass in uniform data for this one just like the old version. We don't as little buffer writing as possible causing stalling.

@einarf
Copy link
Member Author

einarf commented May 28, 2025

TODO

  • Fix tests
  • Clean up capacity values (buff vs idx)
  • Working no-geo shader using textures as per-instance storage
  • Wrap texture lookups as size grows
  • Maybe: merge pos and angle buffer
  • color data should be normalized bytes (f1)
  • Fix spritelist rendering customization examples
  • Fix gpu sprite collision checks
  • Fix draw_sprite() functions
  • Add uv bias
  • Cache geometry in context

@einarf
Copy link
Member Author

einarf commented May 29, 2025

GPU collision will not be supported in WebGL

@einarf einarf marked this pull request as ready for review May 29, 2025 20:29
@einarf einarf changed the title Sprite shader with no geo shader New spritelist rendering system - Support for non-geo shader system May 29, 2025
@einarf einarf merged commit 3501dbd into development May 29, 2025
7 checks passed
@einarf einarf deleted the sprite-no-gs branch May 29, 2025 20:33
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 this pull request may close these issues.

1 participant