# How to add a shadowmap to a GLB

**URL:** <https://forum.babylonjs.com/t/how-to-add-a-shadowmap-to-a-glb/40690>\
**Category:** Questions\
**Tags:** lighting, material, glb, uv, export\
**Created:** [May 11, 2023, 8:27am UTC](https://forum.babylonjs.com/t/how-to-add-a-shadowmap-to-a-glb/40690 "2023-05-11T08:27:13Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [May 12, 2023, 9:24am UTC](https://forum.babylonjs.com/t/how-to-add-a-shadowmap-to-a-glb/40690/6 "2023-05-12T09:24:25Z")

</div>

You’ll need to do what @Vinc3r did in his PG, which is to do it programmatically by loading the lightmaps as separate textures and assigning them to the right materials:

> [@How many lightmap can be used in a gltf model?](https://forum.babylonjs.com/t/how-many-lightmap-can-be-used-in-a-gltf-model/20242/6):
>
> If this example can help: [https://playground.babylonjs.com/#ADPQFC#9](https://playground.babylonjs.com/#ADPQFC#9) (here lightmaps are not embeded in the .glb, but [availabled next to it](https://github.com/BabylonJS/MeshesLibrary/tree/master/CornellBox))

---

_[View the full topic](https://forum.babylonjs.com/t/how-to-add-a-shadowmap-to-a-glb/40690)._
