I’ve got a variant on z-fighting… let’s call it y-fighting.
Looking down at a XoZ ground for a 2D digital toy.
Moving tiles around which, by design, have very little y difference. y = 0.001 and y = 0.002, for example. I found that using useLogarithmicDepth made the y-fighting problems go away.
Now I’ve written a custom shader material and… I have no way (methinks) to set useLogarithmicDepth on a non-standard material, and the custom shader tile is always under all the other tiles.
Is my problem I’m not working z? (I’m willing to convert if that’s the best solution.)
Is there a way to “add” useLogarithmicDepth to shaderMaterials?
I worked around this for now by using a more complicated mesh that uses a standard material for the pattern (rather than having the pattern be generated in the shader), but I’m sure I’ll run into other cases where I’ll want to use shaders and useLogarthmicDepth.