Follow-up from the <Decal> roadmap (previously tracked in packages/cientos/src/core/abstractions/Decal/ROADMAP.md).
Use case
Today's <Decal> bakes geometry against the host mesh — works for static meshes, breaks for skinned / morph targets that deform per frame.
Approach
Project in the fragment shader: sample the parent surface from a decal-local UV computed per pixel. See three.js#21187 — dot(projectorDir, normal).lessThan(0.2).discard().
- Win: works on skinned / morph meshes without re-baking geometry.
Cost / friction
- Custom material or
onBeforeCompile chunk per host material; brittle across three.js versions.
- WebGPU / TSL makes this much cleaner — likely worth waiting for a stable TresJS WebGPU renderer before investing.
- Anti-aliasing along the projector silhouette stays hard (same
cullThreshold issue, just at pixel granularity).
Follow-up from the
<Decal>roadmap (previously tracked inpackages/cientos/src/core/abstractions/Decal/ROADMAP.md).Use case
Today's
<Decal>bakes geometry against the host mesh — works for static meshes, breaks for skinned / morph targets that deform per frame.Approach
Project in the fragment shader: sample the parent surface from a decal-local UV computed per pixel. See three.js#21187 —
dot(projectorDir, normal).lessThan(0.2).discard().Cost / friction
onBeforeCompilechunk per host material; brittle across three.js versions.cullThresholdissue, just at pixel granularity).