Use SOG texture option#18475
Conversation
|
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
|
Reviewer - this PR has made changes to one or more package.json files. |
|
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18475/merge/index.html#WGZLGJ#4600 Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves): https://playground.babylonjs.com/?snapshot=refs/pull/18475/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/18475/merge#BCU1XR#0 If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools. |
|
Reviewer - this PR has made changes to one or more package.json files. |
|
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
|
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18475/merge/index.html#WGZLGJ#4600 Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves): https://playground.babylonjs.com/?snapshot=refs/pull/18475/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/18475/merge#BCU1XR#0 If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools. |
# Conflicts: # packages/dev/core/src/Shaders/ShadersInclude/gaussianSplatting.fx # packages/dev/core/src/ShadersWGSL/ShadersInclude/gaussianSplatting.fx
🟢 Memory Leak Test Results13 passed, 0 leaked out of 13 scenarios 🟢 All memory leak tests passed — no leaks detected. Passed Scenarios (13)
|
|
Visualization tests for WebGPU |
|
WebGL2 visualization test reporter: |
⚡ Performance Test Results🟢 All performance tests passed — no regressions detected. |
|
Reviewer - this PR has made changes to one or more package.json files. |
There was a problem hiding this comment.
Pull request overview
Adds an (currently-off) loader/material/shader path to render SOG (Self-Organized Gaussians) assets by uploading the original WebP payloads as raw GPU textures and performing dequantization directly in the shader, aiming to reduce CPU decode work and improve load times.
Changes:
- Added
useSogTexturesoption to SPLAT loading options and routed SOG parsing through a new “raw texture pack” parser. - Introduced a SOG texture pack (
sogTextures) plumbing path from loader → mesh → material → shaders, including new shader defines/uniforms/samplers. - Added a visualization test entry for a SOGS SH scenario.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/tools/tests/test/visualization/config.json | Adds a new visualization test case for SOGS SH scenario. |
| packages/dev/loaders/src/SPLAT/splatLoadingOptions.ts | Introduces useSogTextures loader option (default false). |
| packages/dev/loaders/src/SPLAT/splatFileLoader.ts | Selects SOG parser based on option and feeds results into GS mesh via setSogTextureData. |
| packages/dev/loaders/src/SPLAT/splatDefs.ts | Adds ISogTexturePack + sogTextures?: ... to parsed splat contract. |
| packages/dev/loaders/src/SPLAT/sog.ts | Adds ParseSogMetaAsTextures to produce raw textures + dequant params instead of CPU-decoded buffers. |
| packages/dev/core/src/ShadersWGSL/ShadersInclude/gaussianSplatting.fx | Adds USE_SOG path for in-shader dequant + SH reconstruction (WGSL include). |
| packages/dev/core/src/ShadersWGSL/gaussianSplatting.vertex.fx | Declares extra SOG uniforms/textures for WGSL vertex shader. |
| packages/dev/core/src/Shaders/ShadersInclude/gaussianSplatting.fx | Adds USE_SOG path for in-shader dequant + SH reconstruction (GLSL include). |
| packages/dev/core/src/Shaders/gaussianSplatting.vertex.fx | Declares extra SOG uniforms/textures for GLSL vertex shader. |
| packages/dev/core/src/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.ts | Adds mesh-side SOG mode, params storage, and setSogTextureData. |
| packages/dev/core/src/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.ts | Adds USE_SOG/USE_SOG_V2 defines + binds SOG uniforms/textures. |
Comments suppressed due to low confidence (1)
packages/dev/loaders/src/SPLAT/splatFileLoader.ts:245
- The
new Promise((resolve) => { sogParser(...).then(...).catch(() => { throw ... }) })pattern can leave the outer Promise pending forever on failure: the.catchthrows into the inner promise chain, but the outer promise is never rejected. Return thesogParser(...).then(...)promise directly or add arejectcallback and call it from.catch(and propagate the original error).
return new Promise((resolve) => {
sogParser(dataSOG, rootUrl, scene)
// eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then
.then((parsedSOG) => {
makeGSFromParsedSOG(parsedSOG);
resolve(babylonMeshesArray);
})
// eslint-disable-next-line github/no-then
.catch(() => {
throw new Error("Failed to parse SOG data.");
});
});
🟢 Memory Leak Test Results13 passed, 0 leaked out of 13 scenarios 🟢 All memory leak tests passed — no leaks detected. Passed Scenarios (13)
|
|
WebGL2 visualization test reporter: |
|
Visualization tests for WebGPU |
|
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
|
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18475/merge/index.html#WGZLGJ#4600 Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves): https://playground.babylonjs.com/?snapshot=refs/pull/18475/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/18475/merge#BCU1XR#0 If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools. |
|
WebGL2 visualization test reporter: |
🟢 Memory Leak Test Results13 passed, 0 leaked out of 13 scenarios 🟢 All memory leak tests passed — no leaks detected. Passed Scenarios (13)
|
|
Visualization tests for WebGPU |
⚡ Performance Test Results🟢 All performance tests passed — no regressions detected. |
Option (off for now) to use SOG webp texture instead of decomposing them into individual components.