The previous decal will change color after continuous use
Electric spark, welding | Babylon.js Playground (babylonjs.com)
The previous decal will change color after continuous use
Electric spark, welding | Babylon.js Playground (babylonjs.com)
The particles are also rendered inside the decal map texture!
Hereās the fix:
And a workaround before the fix is merged:
Thatās because each face of the cube does not have their own uv space area, they all share the same (0,0) => (1,1) space. So, something displayed in a face will also be displayed in other faces:
You get the artifacts in your screenshot when the decal is drawn over a edge:
You can use a plane instead of a box to make it work:
Thanks, the problem has been solved, digression: is there a big gap between using box and decal performanceļ¼
is there a big gap between using box and decal performanceļ¼
Iām not sure to understand?
Do you mean between mesh decals and texture decals? The latter is much faster but can have some drawbacks, see:
If the mesh you project the decal onto is a simple flat plane as in the PG, itās probably faster to create a new plane each time you want to create a new decal (you can clone the plane instead of creating a new one) and pre-create all the materials instead of creating a new one each time (you only have a limited combination of textures). But you will probably have to deal with z-fighting at some point and use the zOffset property of the material to try to fix it.