# When using a Fog Block and a Reflection Block only skybox mode works

**URL:** <https://forum.babylonjs.com/t/when-using-a-fog-block-and-a-reflection-block-only-skybox-mode-works/17088>\
**Category:** Bugs\
**Tags:** material\
**Created:** [January 2, 2021, 9:11am UTC](https://forum.babylonjs.com/t/when-using-a-fog-block-and-a-reflection-block-only-skybox-mode-works/17088 "2021-01-02T09:11:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![holofermes](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/holofermes/32/13324_2.png) [@holofermes](https://forum.babylonjs.com/u/holofermes)\
**Post date:** [January 2, 2021, 9:11am UTC](https://forum.babylonjs.com/t/when-using-a-fog-block-and-a-reflection-block-only-skybox-mode-works/17088/1 "2021-01-02T09:11:30Z")

</div>

Hey all,

I am getting some errors in this really simple scene, and I was able to narrow down how to reproduce them here

> **[Babylon.js Node Material Editor](https://nme.babylonjs.com/#B4EYRJ%2312)**

It looks like when there’s a Fog Block and a Reflection Block, I can only set the “Reflection mode” dropdown to “Skybox”, for all the other options I get a compilation error:

`:7:20: Shader compilation error: VERTEX SHADER ERROR: 0:120: 'normalize' : no matching overloaded function found ERROR: 0:120: 'xyz' : field selection requires structure, vector, or interface block on left hand side ERROR: 0:120: 'constructor' : not enough data provided for construction`

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [January 3, 2021, 10:32am UTC](https://forum.babylonjs.com/t/when-using-a-fog-block-and-a-reflection-block-only-skybox-mode-works/17088/2 "2021-01-03T10:32:54Z")

</div>

Assigned @Evgeni\_Popov on January 3, 2021, 10:32am UTC



---

<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:** [January 4, 2021, 1:34pm UTC](https://forum.babylonjs.com/t/when-using-a-fog-block-and-a-reflection-block-only-skybox-mode-works/17088/3 "2021-01-04T13:34:04Z")

</div>

Thanks for the repro, here’s the PR:

> <https://github.com/BabylonJS/Babylon.js/pull/9730>

---

<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:** [January 4, 2021, 6:04pm UTC](https://forum.babylonjs.com/t/when-using-a-fog-block-and-a-reflection-block-only-skybox-mode-works/17088/4 "2021-01-04T18:04:32Z")

</div>

The fix is now on the playground.

You can use this url for the fixed material: [https://nme.babylonjs.com/#B4EYRJ#13](https://nme.babylonjs.com/#B4EYRJ#13)

You can’t easily fix it yourself because you need to update the .json file manually for the fix to be effective.

---

<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:** [January 4, 2021, 6:04pm UTC](https://forum.babylonjs.com/t/when-using-a-fog-block-and-a-reflection-block-only-skybox-mode-works/17088/5 "2021-01-04T18:04:58Z")

</div>

Unassigned @Evgeni\_Popov on January 4, 2021, 6:04pm UTC



---

<div class="post-metadata">

**Author:** ![holofermes](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/holofermes/32/13324_2.png) [@holofermes](https://forum.babylonjs.com/u/holofermes)\
**Post date:** [January 7, 2021, 7:37am UTC](https://forum.babylonjs.com/t/when-using-a-fog-block-and-a-reflection-block-only-skybox-mode-works/17088/6 "2021-01-07T07:37:19Z")

</div>

Thank you very much @Evgeni_Popov, I appreciate the quick fix!
