I have this Mesh: The specific mesh named OCounter and I want to display the Decal on the front of the mesh.
I tried this:
textureDecal.side = THREE.DoubleSide
const euler = new THREE.Euler(0,0,0, "XYZ");
const decalImage = new DecalGeometry(
OCounter,
new THREE.Vector3(0, 0, 5),
euler,
new THREE.Vector3(2,2, 10)
);
const decalMaterial = new THREE.MeshStandardMaterial({
transparent: true,
depthTest: true,
depthWrite: false,
polygonOffset: true,
polygonOffsetFactor: -4,
});
decalMaterial.side = THREE.DoubleSide;
DecalLogo = new THREE.Mesh(decalImage, decalMaterial);
scene.add(DecalLogo);
I tried with a cube and a sphere, it works properly by changing Vector3 values in DecalGeometry.
But even with various settings on this mesh, it does not display at all, not even a small portion of the decal.