The previous decal will change color after continuous use

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:

3 Likes


Electric spark, welding | Babylon.js Playground (babylonjs.com)
Repaired stickers may have bugs

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:

1 Like

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:


What I mean is that there is a significant performance difference between using decals to achieve welding scars and using flat or box to achieve welding scars?

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.

2 Likes