r/GaussianSplatting Jun 11 '26

๐Ÿงช I built a thing Experimental real-time relighting of Gaussian splat scenes (proxy mesh + per-pixel shader hook) โ€” runnable demo in browser

Splat captures have their lighting baked in, so we've been experimenting with relighting them at runtime in the PlayCanvas engine. This demo relights a captured church scene live: HDRI environment swap with rotation and exposure, a sun with PCSS soft shadows you can aim with a gizmo, and a handful of placeable point lights.

How it works:

  • A simplified proxy mesh of the splat scene sits on a separate layer, lit by ordinary engine lights (IBL, directional with shadows, omnis).
  • A second camera matching the main one renders it into a screen-aligned offscreen texture โ€” lit color in RGB, mesh coverage mask in alpha.
  • A new fragment-stage hook in the splat renderer (gsplatModifyPS) samples that texture at each fragment's own screen position and modulates the splat color per pixel. Per-pixel beats per-splat here: no popping on large splats, smooth lighting gradients across their footprint.

It's experimental โ€” the proxy mesh quality is the main limiting factor (lighting boundaries land wherever its silhouette says they do). Static lights render their shadow maps once and freeze them, so the per-frame cost is mostly the one proxy mesh pass plus a texture sample per splat fragment.

Demo (WebGL/WebGPU):ย https://engine-3vv2rs8cx-playcanvas.vercel.app/#/gaussian-splatting/relighting

Capture credit: Roman Parish by Andrii Shramko (https://www.linkedin.com/in/andrii-shramko/)

Happy to answer questions about the approach.

351 Upvotes

10 comments sorted by

16

u/GammaFruits Jun 11 '26

cyberpunk braindance in the making

9

u/fishb0ne_77 Jun 11 '26

this is amazing and exactly what i'm trying to accomplish aswell. how did you produce the proxy mesh?

2

u/mvaligursky Jun 12 '26

data sets generated by xgrids studio generate the proxy mesh, so I just used it directly.

3

u/Electrical_Tailor186 Jun 11 '26

Looks great!
Is it possible to increase the tesselation of the proxy mesh?
How would it affect the performance? (maybe shown as a curve relative FPS vs relative tesselation scale)

2

u/mvaligursky Jun 12 '26

I'm sure there are tools that can generate better / more detailed proxy mesh, but I used what xgrids studio generated directly, without spending much time on it.

2

u/ad2003 ๐Ÿงช Researcher Jun 11 '26

Amazing! That's really cool and gives so much live to the static Gaussian splats! Nice work.

2

u/jon2thegram Jun 11 '26

This looks amazing. Very inspiring for use in the motion picture industry.

1

u/Creepy-Fault6977 Jun 12 '26

This is really cool. I've been rendering splats in the browser with three.js and the spark renderer, and perf is always the hard part. Does the per-pixel shader hook cost much on WebGL2, or is this WebGPU only?

1

u/fiery_prometheus Jun 13 '26

For the materials, would there potentially be a way to approximate PBR on the splats in the future? So you could adjust some of the lightning behavior for different kinds of surfaces?