Skip to content

feat(Gsplat): IBL shadows support for Gaussian Splats#18331

Merged
RaananW merged 29 commits intoBabylonJS:masterfrom
raymondyfei:yfei/gsplat_voxel_shadow
Apr 17, 2026
Merged

feat(Gsplat): IBL shadows support for Gaussian Splats#18331
RaananW merged 29 commits intoBabylonJS:masterfrom
raymondyfei:yfei/gsplat_voxel_shadow

Conversation

@raymondyfei
Copy link
Copy Markdown
Contributor

@raymondyfei raymondyfei commented Apr 16, 2026

Summary

This PR extends the IBL shadow voxelizer to support GaussianSplattingMesh on WebGL and WebGPU.

Splats are rasterized as quads; edge-on quads produce no fragments, so they can’t be voxelized like triangle meshes in one pass. Splats are drawn three times (one per world axis) so each splat is face-on from at least one direction.

computeVoxelSplatWorldPos (shared GLSL/WGSL) orients each quad from the current view using splat rotation/scale data.

Opt-in memory: voxelization needs extra rotation/scale textures. Set needsRotationScaleTextures = true when loading splats if you want to enable this GSplat IBL shadow feature (playground #DAID4Q). We'll log an error and early exit if neither keepInRam = true nor needsRotationScaleTextures = true is set when enabling the IBL shadow and adding the GSplat as a caster.

Changes (high level)

  • Shaders: gaussianSplattingVoxel vertex/fragment (GLSL + WGSL); WGSL targets texture_storage_3d.
    gaussianSplatting include adds computeVoxelSplatWorldPos and struct fields behind IS_FOR_VOXELIZATION.
  • API: GaussianSplattingMaterial.makeVoxelRenderingMaterial(); mesh/base needsRotationScaleTextures; SPLATLoadingOptions.needsRotationScaleTextures for load-time allocation.
  • Pipeline: iblShadowsVoxelRenderer custom render path + shared tri-axis view matrices; iblShadowsRenderPipeline toggles the flag when splat casters are added/removed.
  • Tests: playground visualization + WebGL/WebGPU reference images.
gsplat-ibl-shadows

@sebavan
Copy link
Copy Markdown
Member

sebavan commented Apr 16, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 16, 2026

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@Popov72
Copy link
Copy Markdown
Contributor

Popov72 commented Apr 16, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 16, 2026

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 17, 2026

Snapshot stored with reference name:
refs/pull/18331/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18331/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18331/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/18331/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/18331/merge
https://gui.babylonjs.com/?snapshot=refs/pull/18331/merge
https://nme.babylonjs.com/?snapshot=refs/pull/18331/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/18331/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.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 17, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 17, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 17, 2026

@RaananW RaananW merged commit 724f607 into BabylonJS:master Apr 17, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants