# How to use RSM Global Illumination?

**URL:** <https://forum.babylonjs.com/t/how-to-use-rsm-global-illumination/47702>\
**Category:** Questions\
**Tags:** animation, animationgroups\
**Created:** [January 31, 2024, 2:15pm UTC](https://forum.babylonjs.com/t/how-to-use-rsm-global-illumination/47702 "2024-01-31T14:15:10Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 1, 2024, 12:42pm UTC](https://forum.babylonjs.com/t/how-to-use-rsm-global-illumination/47702/3 "2024-02-01T12:42:58Z")

</div>

We didn’t communicate on this feature yet, because we still need to write a demo and some documentation about it. Also, keep in mind it’s not a full GI solution, as you could find in some games, for eg (more details in the doc to come)!

Regarding your PG:

- you must call `giRsmManager.addMaterial();` to enable all materials of the scene for GI rendering
- you must call `rsm.updateLightParameters()` to make sure light parameters are calculated (I will make a PR to do it automatically when `rsm.addMesh` is called).
- you should remove “skybox” and “groundbox” from the render list of the RSM, because these meshes are very big and will create a very big bounding box for the light, meaning the whole scene will be rendered only in a small part of the RSM the render targets
- GIRSM is not compatible with the pre-pass renderer, so I updated SSAO/SSR to use the geometry buffer renderer instead

Here’s the updated PG (it shows the GI contribution by default - comment line 174 to show the true rendering):

> **[Babylon.js Playground](https://playground.babylonjs.com/#50ND0P%2316)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Note however that you won’t see a big difference in your scene. Here’s another PG that should demonstrate the effect a little better:

> **[Babylon.js Playground](https://playground.babylonjs.com/#4AJ16M%231003)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

_[View the full topic](https://forum.babylonjs.com/t/how-to-use-rsm-global-illumination/47702)._
