Right now I am using a shader that is exactly the same as the default “Sprites/Default” shader, with the exception of ZWrite being On instead of Off. This change makes the shader accomplish most of what I want it to do, but unfortunately it causes a strange rendering problem:
As you can see in the above clip, some of the tiles will cause the tiles behind them not to be rendered (look at the flowers and trees). Whether or not this occurs changes based on the camera angle, so I’m demonstrating this by swapping between 2D and 3D mode, which moves the camera.
I imagine this has something to do with culling, but I’m not familiar enough with shaders to know how to fix it. I’m not sure if it makes any difference, but all the tiles are drawn with MeshRenderers, not SpriteRenderers. Any ideas would be appreciated. Thank you!