indigo
indigo copied to clipboard
Skip depth sorting for pixel art
Could be fiddly, but technically you don't need to depth sort any pixel art that is a combo of fully opaque and fully transparent pixels. Using the depth buffer instead, reducing overdraw and per frame scene sorting.
Detecting whether a material / texture can be used this way is the trick. Maybe we set a material flag or something? Maybe we can inspect the image data on load?
Actually, IIRC, that's what Flash used to do. You could manually tell it whether the graphics used transparency or not.