0

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 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.