Follow-up from the <Decal> roadmap (previously tracked in packages/cientos/src/core/abstractions/Decal/ROADMAP.md).
Use case
Scenes with many decals on the same mesh currently issue one draw call per decal. Past ~100 decals per host mesh this becomes a bottleneck.
Approach
Merge every DecalItem's BufferGeometry (same material) into a single BufferGeometry and render it as one draw call.
- Useful from: ~100 decals on the same mesh.
- Re-merge cost: O(total vertices) on every edit. Mitigate with lazy batching — keep the entry being edited as its own un-merged mesh, merge only on
commit() / initial scene load.
Friction
- Hover edges (
EdgesGeometry) and per-decal material slot need their own path.
polygonOffsetFactor becomes per-batch.
Prerequisite for the full draw-call collapse: a texture atlas + unified material (separate issue).
Follow-up from the
<Decal>roadmap (previously tracked inpackages/cientos/src/core/abstractions/Decal/ROADMAP.md).Use case
Scenes with many decals on the same mesh currently issue one draw call per decal. Past ~100 decals per host mesh this becomes a bottleneck.
Approach
Merge every
DecalItem'sBufferGeometry(same material) into a singleBufferGeometryand render it as one draw call.commit()/ initial scene load.Friction
EdgesGeometry) and per-decal material slot need their own path.polygonOffsetFactorbecomes per-batch.Prerequisite for the full draw-call collapse: a texture atlas + unified material (separate issue).