Here are my settings for the materials…
material[num].texture.polygonOffset = true;
material[num].texture.polygonOffsetFactor = -10;
material[num].texture.polygonOffsetUnits = 0.1;
material[num].texture.needsUpdate = true;
material[num].flat.polygonOffset = true;
material[num].flat.polygonOffsetFactor = -10;
material[num].flat.polygonOffsetUnits = 0.1;
material[num].flat.needsUpdate = true;
material[num].wireframe.polygonOffset = true;
material[num].wireframe.polygonOffsetFactor = -20;
material[num].wireframe.polygonOffsetUnits = 0.1;
material[num].wireframe.needsUpdate = true;
material[num].hoverWireframe.polygonOffset = true;
material[num].hoverWireframe.polygonOffsetFactor = -20;
material[num].hoverWireframe.polygonOffsetUnits = 0.1;
material[num].hoverWireframe.needsUpdate = true;
The problem is that the wireframe always is z-fighting with the texture material (so parts of the wireframe get hidden), even though the texture material isn’t being offset as much as the wireframe.
How do I fix this? I need to be able to offset in the negative direction and have the wireframe be in front of the texture.