Fix z fighting issues

Hi, I am making an interactive origami bowl animation. I want the model to have different colors on its back and front side. I also want to show step lines for which I just add a texture with lines drawn on it onto the materials.
Currently, I am using two objects with two different materials with each’s side set to FrontSide and BackSide. I use polygonOffsetFactor on the back material to reduce z-fighting to some degree. It isn’t perfect, there are still small artifacts. I have tried using logarithmicDepthBuffer. But no result.
The near and far planes of the camera are 1 and 10. polygonOffsetFactor of -4 gives good result in the video but it is not good when the textures come into the scene.


I should have known that this couldn’t be fixed by just using some shader. When muliple surfaces overlap there is no way for the computer to know which among them is to be on the top and which is to on the bottom.
I will manually re-adjust the vertices to stop the z-fighting issue.