I copy the official decals example and change it by myself, I create an object add the mesh and the decals, and when the object rotate, I find the decals is not right?
I write the jsfiddle demo, you can click the button change rotate status.
Looks like a z-fighting problem. You can use polygon offset to fix it.
const decalMaterial = new THREE.MeshPhongMaterial({
specular: 0x444444,
transparent: true,
polygonOffset:true,
polygonOffsetUnits:-10,
polygonOffsetFactor:-1,
});
Thank you.
I understand what you mean, and I add the code then update the demo. But if you let it rotate first, then put the decas, It will be very strange.