# Remove Shadow Reflection When scene.renderTargetsEnabled is false

**URL:** <https://forum.babylonjs.com/t/remove-shadow-reflection-when-scene-rendertargetsenabled-is-false/26628>\
**Category:** Questions\
**Created:** [January 11, 2022, 6:20am UTC](https://forum.babylonjs.com/t/remove-shadow-reflection-when-scene-rendertargetsenabled-is-false/26628 "2022-01-11T06:20:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muhamad\_Rifky1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/muhamad_rifky1/32/21119_2.png) [@Muhamad\_Rifky1](https://forum.babylonjs.com/u/Muhamad_Rifky1)\
**Post date:** [January 11, 2022, 6:20am UTC](https://forum.babylonjs.com/t/remove-shadow-reflection-when-scene-rendertargetsenabled-is-false/26628/1 "2022-01-11T06:20:02Z")

</div>

Hi all,

Is there a way to get rid of mirror reflections when “scene.renderTargetsEnabled” is turned off?

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/c/6cb509dca81174e90c7ee1cd4da21bf98fddfb36.jpeg)

---

<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 11, 2022, 7:54am UTC](https://forum.babylonjs.com/t/remove-shadow-reflection-when-scene-rendertargetsenabled-is-false/26628/2 "2022-01-11T07:54:21Z")

</div>

Welcome aboard!

If you want to remove the reflection for some materials, you should not set `scene.environmentTexture` and instead set the `reflectionTexture` property of the materials you want to be reflective.

---

<div class="post-metadata">

**Author:** ![Muhamad\_Rifky1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/muhamad_rifky1/32/21119_2.png) [@Muhamad\_Rifky1](https://forum.babylonjs.com/u/Muhamad_Rifky1)\
**Post date:** [January 11, 2022, 10:08am UTC](https://forum.babylonjs.com/t/remove-shadow-reflection-when-scene-rendertargetsenabled-is-false/26628/3 "2022-01-11T10:08:40Z")

</div>

I didn’t set the scene.environmentTexture, but the reflection appears when the render target is turned off. like in this.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/a/bae675e038350c01b6f1393e2aeb7fdfb7b5d285.jpeg)

Why did it happen ?

---

<div class="post-metadata">

**Author:** ![Muhamad\_Rifky1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/muhamad_rifky1/32/21119_2.png) [@Muhamad\_Rifky1](https://forum.babylonjs.com/u/Muhamad_Rifky1)\
**Post date:** [January 11, 2022, 10:10am UTC](https://forum.babylonjs.com/t/remove-shadow-reflection-when-scene-rendertargetsenabled-is-false/26628/4 "2022-01-11T10:10:09Z")

</div>

When I turn it back on, there is no reflection.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/e/ae03ae80ffe7a1a4c3ad561bf4a1e80aac2fefb6.jpeg)

---

<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 11, 2022, 11:19am UTC](https://forum.babylonjs.com/t/remove-shadow-reflection-when-scene-rendertargetsenabled-is-false/26628/5 "2022-01-11T11:19:37Z")

</div>

I think we will need a repro as I don’t repro in this PG:

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

The ground has a material with a reflection texture set and not the sphere. When disabling the render target rendering the display does not change, the sphere does not get reflections.

---

<div class="post-metadata">

**Author:** ![Muhamad\_Rifky1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/muhamad_rifky1/32/21119_2.png) [@Muhamad\_Rifky1](https://forum.babylonjs.com/u/Muhamad_Rifky1)\
**Post date:** [January 19, 2022, 3:31am UTC](https://forum.babylonjs.com/t/remove-shadow-reflection-when-scene-rendertargetsenabled-is-false/26628/6 "2022-01-19T03:31:22Z")

</div>

I have found a way to get rid of it. The glass’s texture level is set to 0 and the reflection disappears

`textureGlass.level = 0`
