I have a Unity game where cubes roll from one tile to another, and when the cubes roll a small part of the cubes textures overlap and its messed up looking. I ideally want the cube closest to the players texture to over-ride the cubes texture behind. Here is an image of the problem - (Right hand side, middle height is the problem) https://i.ibb.co/Qvj8GQn/Screenshot-417.png https://ibb.co/LdhQfR6
1 Answer
Add this to the start of your shader pass:
Offset 0, -1
This will offset the pixels depth buffer value to resolve as being closer to the camera. Just put it together with all the other pass keywords, if there are any.