spriteManager.disableDepthWrite while looping through children

Does disabling depth writing work if you toggle it on and off while looping through a SpriteManager’s children? I was trying to fix a ‘twinkle’ effect of sprites rendered as 1 pixel in a stardome, and realized that the ‘twinkle’ was actually due to one sprite eclipsing another. In real space, this wouldn’t happen - stars are point sources with a size vastly smaller than 1 pixel - more like 1 billionth of a pixel - so they can’t overlap each other. In that case, you want depth writing off for distant stars, on for stars close enough to show a visible disc.

No, the depth write state is used to draw all the sprites at once, you can’t draw some sprites with a state and some others with another one, except if you create different sprite managers.

1 Like