Skip to content

Add reflected SH support for MirrorGaussian scenes - #411

Draft
katjaschwarz wants to merge 1 commit into
sparkjsdev:mainfrom
katjaschwarz:mirrorgaussian-rendering
Draft

Add reflected SH support for MirrorGaussian scenes#411
katjaschwarz wants to merge 1 commit into
sparkjsdev:mainfrom
katjaschwarz:mirrorgaussian-rendering

Conversation

@katjaschwarz

Copy link
Copy Markdown

Summary

  • Add an object-space view basis to SplatMesh for reflected spherical-harmonic evaluation.
  • Apply the basis consistently to packed, extended, and paged/LOD splat sources.
  • Add a manifest-driven multi-mirror example that composites real, reflected, and mask passes from one camera snapshot.

Why

MirrorGaussian reflects Gaussian geometry across each mirror plane, but view-dependent color also needs the corresponding reflection applied to the SH view direction. Without this transform, reflected geometry has incorrect view-dependent appearance.

How

SplatMesh exposes a shViewBasis matrix and passes it into every directional splat fetch path before SH evaluation. The example loads one reflected scene and mask per manifest mirror, waits for each Spark renderer to sort against the same camera snapshot, and composites the resulting render targets. It disables LOD in the example because independently updated LOD trees can put the passes at different camera states.

Test plan

  • npm run lint
  • npm test
  • npm run build

Made with Cursor

Expose an object-space SH view basis on SplatMesh and apply it across packed, extended, and paged splat sources. Add a manifest-driven multi-mirror example that synchronizes real, reflection, and mask passes while navigating.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mrxz

mrxz commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

The descriptions reference a MirrorGaussian which isn't part of the PR and the example refers to assets that aren't included. It would be nice to have a small and self-contained example showing a mirrored splat for which the spherical harmonics need to be reflected (e.g. splat with a mirrored version next to it)

Since you appear to be loading dedicated mirror and mask splat files anyway, wouldn't it make more sense to mirror the SH ahead of time? And even if mirrored at runtime, wouldn't it be an option to mirror the SH before evaluating?

Not saying I'm against the idea of handling it at the SH evaluation stage, but then I'd rather make the SH evaluation pluggable/extendable.

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.

2 participants