# Reflection Probes with Node Material PBRMetallicRoughness?

**URL:** <https://forum.babylonjs.com/t/reflection-probes-with-node-material-pbrmetallicroughness/16193>\
**Category:** Questions\
**Tags:** documentation, material, shader\
**Created:** [December 1, 2020, 11:47am UTC](https://forum.babylonjs.com/t/reflection-probes-with-node-material-pbrmetallicroughness/16193 "2020-12-01T11:47:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tapanij](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tapanij/32/50936_2.png) [@tapanij](https://forum.babylonjs.com/u/tapanij)\
**Post date:** [December 1, 2020, 11:47am UTC](https://forum.babylonjs.com/t/reflection-probes-with-node-material-pbrmetallicroughness/16193/1 "2020-12-01T11:47:31Z")

</div>

Hi. [The documentation about reflection probes](https://doc.babylonjs.com/divingDeeper/environment/reflectionProbes) doesn’t mention how to use reflection probes with node material with PBRMetallicRoughness.  
Is it supported yet and if it is then how? Thanks.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [December 1, 2020, 4:10pm UTC](https://forum.babylonjs.com/t/reflection-probes-with-node-material-pbrmetallicroughness/16193/2 "2020-12-01T16:10:57Z")

</div>

You can set the reflection probe texture to `pbrMetallicRoughness.environmentTexture` and it should work 🙂

---

<div class="post-metadata">

**Author:** ![tapanij](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tapanij/32/50936_2.png) [@tapanij](https://forum.babylonjs.com/u/tapanij)\
**Post date:** [December 2, 2020, 1:52pm UTC](https://forum.babylonjs.com/t/reflection-probes-with-node-material-pbrmetallicroughness/16193/3 "2020-12-02T13:52:19Z")

</div>

I’m not sure what you mean with `pbrMetallicRoughness.environmentTexture` because I couldn’t find that from pbrMetallicRoughness block or anywhere else than `scene.environmentTexture` and setting to that didn’t work. No errors, it just doesn’t show the texture. Here in the playground I tested by setting `ReflectionBlock.texture = probe.cubeTexture` , same thing , nothing happens. From node material editor I can see that it didn’t load the texture for some reason. Works fine with `BABYLON.PBRMaterial` (comment out lines 203-205)  
[Babylon.js Playground](https://playground.babylonjs.com/#M2RLFD#1)

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [December 2, 2020, 5:03pm UTC](https://forum.babylonjs.com/t/reflection-probes-with-node-material-pbrmetallicroughness/16193/4 "2020-12-02T17:03:36Z")

</div>

pinging @sebavan

---

<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:** [December 2, 2020, 5:18pm UTC](https://forum.babylonjs.com/t/reflection-probes-with-node-material-pbrmetallicroughness/16193/5 "2020-12-02T17:18:22Z")

</div>

Adding @Evgeni_Popov our PBR Node Hero

---

<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:** [December 2, 2020, 5:33pm UTC](https://forum.babylonjs.com/t/reflection-probes-with-node-material-pbrmetallicroughness/16193/6 "2020-12-02T17:33:53Z")

</div>

When using the PBRMaterial, some magic is done for you when you bind a render target texture to the reflection slot. When using a node material there’s no such magic, so you have to do it yourself 🙂

Namely, you need to instruct the system that the render target of the probe should be generated by doing:

```javascript
scene.customRenderTargets.push(probe.cubeTexture);

```

[https://playground.babylonjs.com/#M2RLFD#4](https://playground.babylonjs.com/#M2RLFD#4)

---

<div class="post-metadata">

**Author:** ![tapanij](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tapanij/32/50936_2.png) [@tapanij](https://forum.babylonjs.com/u/tapanij)\
**Post date:** [December 3, 2020, 12:08pm UTC](https://forum.babylonjs.com/t/reflection-probes-with-node-material-pbrmetallicroughness/16193/7 "2020-12-03T12:08:31Z")

</div>

Perfect! Thank you very much 😃 👍!
