Hi again folks,
I’m trying to make a decal projection system akin to this one:
http://blog.wolfire.com/2009/06/how-to-project-decals/
It basically works by cutting out a portion of an existing mesh to make a decal geometry that conforms to the shape it’s being projected onto. I’m making good headway with mesh generation, but I’m having trouble with the material.
Seeing as the resulting mesh will be placed directly on top of the existing one, it will of course result in flickering and z-fighting. How can I mitigate this? I need to make sure it’s being rendered on-top.
I’ve toyed with StandardMaterial.depthBias
which seems to work nicely, but not when I disable StandardMaterial.depthWrite
, which I believe is the correct thing to do for transparent decals?
Is there some clever combination or draw-back that I’m oblivious to?