# Shade - WebGPU graphics

**URL:** <https://discourse.threejs.org/t/shade-webgpu-graphics/66969>\
**Category:** Showcase\
**Tags:** webgpu, rendering\
**Created:** [June 17, 2024, 10:46pm UTC](https://discourse.threejs.org/t/shade-webgpu-graphics/66969 "2024-06-17T22:46:29Z")\
**Posts on this page:** 1\
**Showing post:** 116

<div class="post-metadata">

**Author:** ![Usnul](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/usnul/32/2355_2.png) [@Usnul](https://discourse.threejs.org/u/Usnul)\
**Post date:** [December 28, 2025, 8:55am UTC](https://discourse.threejs.org/t/shade-webgpu-graphics/66969/116 "2025-12-28T08:55:41Z")

</div>

> [@trusktr](#):
>
> There’s one thing that my eye picked up on: at 0:18 the light seems to penetrate through the pot on the floor.

Ha, that’s a good catch. It’s actually nothing to do with GI per-se, it’s just lack of shadowing on the point lights. That Brazier has a pretty big but dim light attached to it

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/9/1/917b58b4d06f9c116dff2fc6442f366930968b25.jpeg)

As far as the GI goes, it’s so complex it would take hours to explain everything. But I will try to just explain the relevant bits.

So… GI. It’s largely based on [Gentle Light Probing](https://discourse.threejs.org/t/gentle-light-probing/44155) write-up.

This is DDGI (Dynamic Diffuse Global Illumination). How do we deal with light bleeding?

There are 5 broad parts:

1. GI probes are split into cells, cells provide locality.
2. Each probe has it’s own depth map, so we have pretty accurate visibility to any given probe
3. When weighing probes, we take surface normal into account to check for visibility, i.e. “Is this surface visible from probe’s perspective?”
4. We apply parallax correction when sampling. This is broadly based on “Local Image-based Lighting With Parallax-corrected Cubemaps”.
5. But we perform additional refinement here, similar to how parallax occlusion maps work.

The last point about refinement is something I was working on in the past couple of days.

To try and help visualize this, here’s a test scene called “PicaPica” lit by the direct+GI

 ![Screenshot 2025-12-28 075959](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/f/1/f175c320a637a6a0cc095e53e799bf152bce044e.jpeg)

Here are the probe locations

 ![Screenshot 2025-12-27 033154](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/a/f/af400c1e4a08338df9fea40ad1390a8ae3d4ee59.jpeg)

There are a total of ~2500 probes in the scene overall.

If we isolate just the radiance from the probes, we get this

 ![Screenshot 2025-12-28 062245](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/2/0/202e70d8c256b1d1e33516f5b12965b91a7f3dda.jpeg)

It’s not super accurate, but consider that each pixel samples from it’s own set of 4 probes, and we do points 1 through 4 here to make sure we don’t “leak” light.

Now here’s the last step, step 5, the refinement of parallax correction

 ![Screenshot 2025-12-28 081545 - alignment pow4](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/2/3/23bf00777f6452dce6f5b207c94cb8762252b3fb.jpeg)

Pretty dramatic improvement

And here’s a path-traced reference with mirror reflections

 ![Screenshot 2025-12-25 154019](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/3/e/3e7b1d4a22722a754a8bf0456d9019fb5c0eb998.jpeg)

* * *

To show it from a different angle, here’s a famous Sibenik cathedral model lit by just the rays of light getting through the tower windows

 ![Screenshot 2025-12-27 061636](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/8/9/89cf34b720214542dc4f3fe65075a7aa501c86b3.jpeg)

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/5/2/522b819a4070998ffcd0d2c2c950975feceb2ae1.jpeg)

And here’s a “Breakfast room” scene

 ![Screenshot 2025-12-28 082610](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/9/f/9ff6c2deffb61be666aadd0b6b5ed0cbf8b7860d.jpeg)

lit by just the light streaming through the blinds.

Here’s a different angle

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/6/4/6441a631bb9fd9da8f6812f0e2361dbe5e84ffe2.jpeg)

Note the reflection of the windows in the glossy surface of the jug and the teapot and shadowed interior of the jug

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/6/2/623f0fcedced9e4f869745ec8430d4bd8b54b1d9.jpeg)

* * *

Back to the light shadowing in the temple scene

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/3/7/3710d00e54ff8e15603eb6f2055152cc855258a7.jpeg)

It definitely needs a shadow, I’ve been putting off doing omni-directional shadows and I should get them done sooner rather than later 😅

---

_[View the full topic](https://discourse.threejs.org/t/shade-webgpu-graphics/66969)._
