source mesh, image texture and projection parameters
Babylon mesh representing the decal, parented to the source mesh
Enables a UV-space decal map on a mesh and turns on the decal map plugin of its material. Unlike geometry decals this projects images directly into the mesh texture space, so no geometry is added, decals follow deformation and multiple projections accumulate into a single map. The mesh must have proper, non-overlapping UV coordinates.
mesh, its material and the resolution of the decal map
Babylon decal map renderer used to project images
Projects an image into a decal map. Each call adds the image at the given location, accumulating onto previously projected decals. Use it together with a decal map enabled on the mesh.
decal map renderer, image texture and projection parameters
Clears all projected decals from a decal map, resetting it to empty.
decal map renderer
Creates a geometry decal that projects an image onto a mesh. The decal is a clipped child mesh that hugs the surface of the source mesh, which makes it work with any material and on any static mesh. It adds geometry, so for deforming meshes or many accumulating decals prefer the decal map approach instead.