Hi, I have a problem with my shader, as you can see in the photo some of the tiles are black event though all the other ones are shown. Rotating them fixes it but once they get rotated back the turn black again.
What’s surprising though is that it only happens on android when using isometric camera, never in the editor which makes it hard to fix.
I think you may be encountering a z-fighting issue, which can occur when two or more meshes are attempting to render at the same depth in the scene. This can cause visual artifacts, such as flickering or black polygons, to appear in the rendered image.
There are a few different ways you can try to fix this issue:
Adjust the “Z Write” and “Z Test” settings on your materials: These settings control how the depth of a mesh is determined and how it is compared to other meshes in the scene. You can try setting the “Z Write” value to “Off” on one or more of the materials causing the issue, which will prevent them from writing to the depth buffer. You can also try setting the “Z Test” value to “Less” or “LessEqual” on one or more of the materials, which will cause them to be rendered only if they are closer to the camera than other meshes in the scene.
Use a different camera projection: If you’re using an isometric camera, you may be able to fix the issue by using a different camera projection. For example, you could try using a perspective camera instead of an isometric camera, or you could try using a different isometric projection.
Adjust the rendering order of your meshes: Another option is to adjust the order in which your meshes are rendered, so that the meshes causing the z-fighting issue are rendered last. This can help to ensure that they are always on top of other meshes in the scene, which can help to prevent z-fighting from occurring.
Use a different shader: Finally, you could try using a different shader on the meshes that are causing the issue. Some shaders, such as the “Depth Mask” shader, are specifically designed to prevent z-fighting by masking out pixels that are behind other objects in the scene. Using one of these shaders may help to fix the issue.
I hope these suggestions help! If you continue to have problems, please let me know and I’ll do my best to help.