# Confusion when reading shader source code

**URL:** <https://forum.babylonjs.com/t/confusion-when-reading-shader-source-code/22494>\
**Category:** Questions\
**Created:** [July 20, 2021, 8:44am UTC](https://forum.babylonjs.com/t/confusion-when-reading-shader-source-code/22494 "2021-07-20T08:44:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zion\_Huang](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zion_huang/32/16569_2.png) [@Zion\_Huang](https://forum.babylonjs.com/u/Zion_Huang)\
**Post date:** [July 20, 2021, 8:44am UTC](https://forum.babylonjs.com/t/confusion-when-reading-shader-source-code/22494/1 "2021-07-20T08:44:01Z")

</div>

I encountered two questions while studying babylon source code(very beautiful I have to say 😆).

1. What does {X} means?

> <https://github.com/BabylonJS/Babylon.js/blob/e839b903699f99bdf6699182d9beec983f0e26d8/src/Shaders/ShadersInclude/lightUboDeclaration.fx#L1>

2. Why is there “[0…maxSimultaneousLights]”(looks like array) in this “includes”?

> <https://github.com/BabylonJS/Babylon.js/blob/e839b903699f99bdf6699182d9beec983f0e26d8/src/Shaders/default.fragment.fx#L201>

---

<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:** [July 20, 2021, 8:57am UTC](https://forum.babylonjs.com/t/confusion-when-reading-shader-source-code/22494/2 "2021-07-20T08:57:30Z")

</div>

Those two are related:

```auto
#include<lightFragment>[0..maxSimultaneousLights]

```

means the `lightFragment.fx` file should be included `maxSimultaneousLights` times and for the first inclusion the `{X}` string will be replaced by 0, for the 2nd inclusion `{X}` will be replaced by 1, …, for the last inclusion `{X}` will be replaced by `maxSimultaneousLights-1`.
