Another issue is how would sprites which are arranged like the follow be made to render properly? This also looks right in the editor but not in engine.
I have the first issue solved by setting the correct blend function before rendering sprites. Although I don’t yet understand why it works sometimes with the wrong function set.
The second issue I think is caused by the depth test, but it’s needed to place the sprites properly behind regular geometry.
Got it all working now. What had to be done was simple - keep depth testing enabled for the sprites, but disable writing to the depth mask temporarily.
Parts of regular meshes with transparency might be a problem still though. Although possibly you could attach sprites to models where these effects are needed. Or have a separate predicate like sprites have and have separate mesh parts with transparent textures drawn on that.
I seem to be running into this issue too. I’ve got a perspective camera from a near-2D point of view, just rotated 20 degrees on the X axis. I have one big sprite as the background grid, and a smaller sprite just above it (the white X). If I move the camera along the Y axis, at a certain point the white X sprite starts drawing behind the grid. That’s with STATE_DEPTH_TEST enabled, and set_depth_mask(false). If I change it to set_depth_mask(true), they draw in the right order, but the transparency of the white X gets messed up. If I raise the X up on the Z axis it moves the tipping point up in Y. Any ideas?