I noticed a weird problem that I’m not able to reproduce yet on the playground.
Updating from alpha 56, I noticed that that sprites started overlapping when they shouldn’t.
A sprite further away is shown in front of one closer to the camera. My code hasn’t changed, I’m trying to reproduce it on the playground, but it’s not yet working.
Particles are also showing through sprites now… I reverted to alpha 56 and the problems were gone…
Has anything changed to the sprites or sprite managers that could explain this?
One thing that did change is that SpriteManager.disableDepthWrite is now working: previously, changing this property would not have any effect. So, if you set it to true it may explain your problems.
Except from this change, there has been another change in the sprite renderer but I don’t see how it could produce what you say: we would need a repro in the Playground to look further.
I’m rebuilding some stuff to find what’s going on in a playground - really no idea where the problem is yet.
The issue seems to have to do with the order in which the sprites are created which is taking priority over the z-value over the actual distance to camera…
Ok so I’ve been spending hours debugging and it’s slightly driving me nuts.
I cannot seem to reproduce the problem in the playground, I’ll set up a new ts project and just start building things from there. I checked again and I made no code changes and things work with alpha 56, updating causes the sprite rendering issues.
I did manage to fix my issue locally by commenting out line 277 in the posted PR (spriteRenderer.ts).
So commenting out this line: engine.enableEffect(this._drawWrapperDepth); (added in the PR) made things go back to normal for me. No idea why yet though.