Elektrine lite

← Feed

@aeva@mastodon.gamedev.place

Post #3425564

2026-06-25 01:21 UTC

I'm building what a sprite instancing system, which means I'm building a particle system. I'm tracking their positions in a repeating coordinate space such that they can move and scroll past endlessly. These are drawn with pre-multiplied alpha blending and sorted in back-to-front order. However, because the sprites can overlap, the draw order can change as they move. As a work around I made it so they only re-sort when out of view, but that can lead to oddities when the camera moves.

Replies (1)

  • @aeva@mastodon.gamedev.place 2026-06-25 01:24

    I'm considering working around this by drawing every sprite twice so I can change their order intermittently and then blend out the old sorting position, but I'm wondering if anyone has any better ideas for how to handle the ordering problem without introducing popping? I'm keeping this strictly limited to forward rendering without any render targets or other newfangled rendering features so keep that in mind.

    Open ##3425563