Repository navigation
feat(layers): shared static and RAD SplatLayer scenes - #814
charlieforward9 wants to merge 28 commits into
Conversation
CoverageStmts: 40.90% ▲+4.72% | Branch: 31.79% ▲+5.42% | Funcs: 34.51% ▲+3.51% | Lines: 40.50% ▲+4.47%
|
|
47003c9 to
3f1d6d9
Compare
ef42ba9 to
1a58885
Compare
d8d5c02 to
5e80a2d
Compare
1a58885 to
30f08d9
Compare
30f08d9 to
3550aa4
Compare
ibgreen
left a comment
There was a problem hiding this comment.
Reviewed the shared scene/runtime boundary, URL/Blob descriptors, source/worker lifecycle, RAD paging/admission/selection, per-view/domain ordering, owner picking, prepared/scene routing and shared budget integration.
Fit: SplatLayer should remain the single public facade; format decoding belongs to loaders.gl, GPU paging/sorting to luma.gl, and host/view/accessor integration here. Sharing source identity and residency across owners avoids embedding Coit- or Tree-specific behavior in the runtime.
Publication gate: this implementation relies on the repository's @luma.gl/splats patch. Publish only after a compatible released luma 9.4 package includes the host/RAD APIs and the development patch is removed; verify an external consumer of the packaged ESM/CJS builds and workers.
API follow-ups: document which render settings are shared within a sortDomain, and keep maxActiveSplats visibly a compatibility alias for maxSplats rather than a second independent quota. A requested maxConcurrentLoads change should have an explicit runtime contract.
Approved against #807. Hosted checks pass; no unresolved inline threads at review time. No local suites rerun.
f2be9a5 to
62ca9f2
Compare
3730b4b to
66b1025
Compare
62ca9f2 to
74a84e6
Compare
58333ba to
abcda56
Compare
Add sorted Cartesian scenes to the public Composite SplatLayer: URL/Blob/static/RAD assets, off-thread workers, shared deck/device source residency, global per-view/domain ordering, affine/SH instance handling, owner picking and host-pass presentation. Prepared weighted inputs retain their existing wind, material and shadow path.
Stack: master (#807 landed) → #794 → #806 → #808 → #809 → #814 → #815. Base: #809. Scene APIs remain independent of TreeLayer APIs; the linear landing order resolves overlapping exports, docs, schemas and CI before merge.
Scene submission follows Deck's ancestor/root filters, actual picking pass and cull rectangle. Query-only candidates remain staged until that pass; incompatible picking buffers retire per viewport. Source caching follows data and explicit update triggers. Multi-depth picking excludes whole owners and restores them after the query; prepared-only globe/wrapped-view guards run after scene routing so filtered sibling views cannot block scene initialization. Unsupported projections report recoverable layer/view errors before allocation, preserving supported sibling layers/views. RAD refinement requires perspective Cartesian views; static/prepared sorted scenes also support orthographic views. Drawing and picking share the same physical-pixel ratio, including the device-context fallback.
Hiding every scene owner discards completed hidden selections and queued decoded uploads, releases transient pins after all in-flight selectors settle, and preserves root/presented coverage. Late decode, GPU admission and worker acknowledgement follow the same cleanup; returning views request fresh refinement. Initial root loading still completes while hidden.
A terminal RAD failure stops queued work and releases unused traversal/admission pins only after every view selection settles. Root and presented/per-view frontiers remain protected, including when an upload finishes after failure.
The final parent also includes Farm’s bounded GPU-drain/remount fixture. That fixture changes no production code; the scene lifecycle repairs are described above.
Validation:
yarn, repository build, strict public consumer types, finalyarn lint-fixand diff check.yarn/build: 191 pages. Native adversarial source review and fresh hosted checks must pass on the final head.Publication hold: upstream luma #3398 is merged, but published
@luma.gl/splats9.4.2 still needs the repository compatibility patch. Publish community scene packages after a compatible luma release, patch removal and packaged-consumer verification. Sorted geospatial/globe and RAD orthographic views, hard byte accounting, shared best-first selection across independent RAD hierarchies and scalable WebGL2 ordering remain explicit limits. Software rendering checks do not establish hardware performance.Note
High Risk
Large new GPU/rendering pipeline with workers, shared runtime budgets, and projection/view constraints (RAD perspective-only); errors in residency or ordering could affect frame stability and picking.
Overview
Adds sorted Cartesian scene rendering to public
SplatLayer, beyond the existing weighted prepared path. Scene URLs/Blobs/RAD/static descriptors route through a newSplatSceneLayerand sharedSplatSceneRuntimeeffect that owns per-view/sortDomainglobal ordering, shared source residency, budgets with prepared layers, and owner picking.Loading and refinement run off-thread via RAD and static workers (
PageScheduler,RADScene, worker-sideRADSelectionEngine), with GPU upload pacing, multi-view selection, and status callbacks (onStatusChange). WebGPU uses luma’s paged renderer; WebGL2 uses CPU-sortedSplatCPUSceneRenderer.transparencydefaults toauto(weighted prepared vs sorted scenes); new props includemaxResidentSplats,maxConcurrentLoads,sortDomain, andworkerFactory.Package wiring adds loaders/luma splats deps, worker sideEffects and export paths, an esbuild worker build script, expanded API/docs/upgrade notes, and CI includes
splat-scene.browser.spec.ts. Publication still depends on an upstream luma 9.4 host-pass release (repo patch today).Reviewed by Cursor Bugbot for commit 3009d6b. Bugbot is set up for automated code reviews on this repo. Configure here.