Decals are attached to parent, but they are not clipped to parent boundaries.
This can work reasonably with small decals wree non-clipping is not very visible. But with bigger decals it can be noticeable.
Perhaps there could be some stencil mask bit used to mark elements with decals, and restrict decals based into that. However, this won't work well, if there is multiple different kinds of decals or if nodes with decals overlap are next to each other. In that case decals would leak from node to another.
Stencil mask in decals might also partially fix issues with decals being attached into phy geom boundaries, thus not strictly projected into actual mesh. For this case, calculating actual hit position in mesh might be also possible (requires triangle ray intersection test for whole mesh)
Decals are attached to parent, but they are not clipped to parent boundaries.
This can work reasonably with small decals wree non-clipping is not very visible. But with bigger decals it can be noticeable.
Perhaps there could be some stencil mask bit used to mark elements with decals, and restrict decals based into that. However, this won't work well, if there is multiple different kinds of decals or if nodes with decals overlap are next to each other. In that case decals would leak from node to another.
Stencil mask in decals might also partially fix issues with decals being attached into phy geom boundaries, thus not strictly projected into actual mesh. For this case, calculating actual hit position in mesh might be also possible (requires triangle ray intersection test for whole mesh)