Native: truthful drawBuffersExtension cap and cheaper range-filtered splat sort fallback
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 43/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend, performance
Research direction
Read thinNativeEngine.pure.ts for the drawBuffersExtension capability and the Gaussian splatting mesh base code around the "Native sort can't filter ranges" fallback. Check how _activeSplatRangeKey tracks range changes, then verify the capability and unchanged-range behavior on Native runtimes with and without sortSplatIndices. Done means Native reports the actual multi-framebuffer capability and unchanged range sets avoid rebuilding and uploading the identity index array.
Written by the indexing model from the issue text.
Description
Follow-up from review on #19144 (comments by @matthargett). Nothing here blocks #19144.
1. Make drawBuffersExtension truthful on Native
ThinNativeEngine reports drawBuffersExtension: true unconditionally (thinNativeEngine.pure.ts, caps). The real capability is _engine.createMultiFrameBuffer. On a runtime without it, _createNativeMultiFrameBuffer falls back to a framebuffer bound only to the first color target. A MultiRenderTarget, or the Gaussian splatting streaming atlas (_supportsRenderTargetAtlas), would then silently get only attachment 0: centers but no covariances or colors.
Proposed: drawBuffersExtension: !!this._engine.createMultiFrameBuffer, matching supportDepthStencilTexture a few lines below. Then _supportsRenderTargetAtlas can drop its Native special case.
2. Range-filtered splat sort fallback on older Native runtimes
With #19141 and BabylonNative's sortSplatIndices, range-filtered meshes (streaming compounds, hidden parts) are depth-sorted on Native. On runtimes that only expose sortSplats, gaussianSplattingMeshBase falls back to the range-filtered identity order (around the "Native sort can't filter ranges" comment). That has two costs:
- the compound is drawn unsorted;
- every sort request rebuilds the identity index array in a JS loop and calls
thinInstanceBufferUpdated("splatIndex"), even though the result does not depend on the camera. That is an O(N) interpreter loop plus a 4-byte-per-splat upload per camera move.
Proposed: skip the rebuild and upload while the active range set is unchanged, since the range key is already tracked in _activeSplatRangeKey.
Related
- The 0.29%
Gaussian Splatting LOD COMPOUNDthreshold in #19144 should be re-measured oncesortSplatIndicesships in a BabylonNative release, since the current number may reflect the unsorted fallback.
- Dominant language
- TypeScript
- Stars
- 26.6k
- Forks
- 3.8k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 112
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BabylonJS/Babylon.js
-
WebGPU: Geometry._invalidateVertexBuffers throws 'mesh.subMeshes is not iterable' for a mesh without sub-meshesPossibly taken @vladosskins178 claimed this 14 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
BabylonJS/Babylon.js#19188 ·
Maintainers usually reply within 1 day
-
WebGPU compressed cube readback feeds encoded blocks to diffuse irradiance calculationPossibly taken @yucheng-du claimed this 1 day ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 54/100
BabylonJS/Babylon.js#19278 ·
Maintainers usually reply within 1 day
-
[WebGPU] A render effect whose WGSL fails to compile never reaches onError: isReady() is true and every draw fails on an invalid pipelinePossibly taken @Popov72 claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
BabylonJS/Babylon.js#19224 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
in progress
Difficulty 4/5 3-5 days Newbie friendliness 48/100
BabylonJS/Babylon.js#19212 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
BabylonJS/Babylon.js#19131 ·
Maintainers usually reply within 1 day
All issues in BabylonJS/Babylon.js
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ardia-browser/ardia#6391 ·
Maintainers usually reply within 1 day
-
Feature:Actions/ConnectorTypes Team:ResponseOps
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
elastic/kibana#309028 · 1 comment ·
Maintainers usually reply within 1 day
-
🔨 tool 🧰 library
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Orange-OpenSource/Orange-Boosted-Bootstrap#4035 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
DISIC/teleservice-conformite#230 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
rothgar/rabble.radio#410 ·
Maintainers usually reply within 1 day