Skip to content

feat(cientos): <Decal> shader-based realtime projection #1416

Description

@alvarosabu

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#21187dot(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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    cientosIssues related to @tresjs/cientosexperimentalExperimental featurefeaturep2-to-be-discussedEnhancement under consideration (priority)pending-triageTicket is pending to be prioritised

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions