In this part of the 2.5D Game in Unity series, we will write a shader to resolve the depth issues that appeared in the scene we created.
As we observed in the previous part of the tutorial, moving the camera results in rendering order glitches.
This issue originates from the way Unity renders sprites:
On each frame, Unity determines which sprite to draw in front based on its distance from the camera.
Although the Sprite Renderer has options for Sort Point– both do not solve the issue.

To solve this, we will create …