# Inconsistent lighting with PBRMaterial with scene environmentTexture

**URL:** <https://forum.babylonjs.com/t/inconsistent-lighting-with-pbrmaterial-with-scene-environmenttexture/32956>\
**Category:** Questions\
**Created:** [August 11, 2022, 8:19pm UTC](https://forum.babylonjs.com/t/inconsistent-lighting-with-pbrmaterial-with-scene-environmenttexture/32956 "2022-08-11T20:19:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kvbh](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@kvbh](https://forum.babylonjs.com/u/kvbh)\
**Post date:** [August 11, 2022, 8:19pm UTC](https://forum.babylonjs.com/t/inconsistent-lighting-with-pbrmaterial-with-scene-environmenttexture/32956/1 "2022-08-11T20:19:16Z")

</div>

Giving the scene an environment texture which has a very low level (potentially even 0) will still fully illuminate PBR materials with `metallic=0`. On the opposite side, `metallic=1` will properly appear dark due to its reflectivity. Is there some way for the environment texture’s level to be applied to the PBR materials that aren’t reflective? There is `PBRMaterial.environmentIntensity`, but I was hoping for something that wouldn’t have to be assigned on a per-material basis.

Example link below. Note that commenting out lines 4-6 will make both spheres black, which is also what I’d expect if `environmentTexture`’s level is 0.

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

---

<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:** [August 11, 2022, 11:12pm UTC](https://forum.babylonjs.com/t/inconsistent-lighting-with-pbrmaterial-with-scene-environmenttexture/32956/2 "2022-08-11T23:12:31Z")

</div>

scene.environmentIntensity = 0.01; is what you are looking for as it will impact both specular and diffuse.

[scene.environmentIntensity = 0.01;](https://www.babylonjs-playground.com/#ZEP6EV#1)

---

<div class="post-metadata">

**Author:** ![kvbh](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@kvbh](https://forum.babylonjs.com/u/kvbh)\
**Post date:** [August 12, 2022, 12:42pm UTC](https://forum.babylonjs.com/t/inconsistent-lighting-with-pbrmaterial-with-scene-environmenttexture/32956/3 "2022-08-12T12:42:52Z")

</div>

Is there a way to simultaneously make the skybox object use the same intensity? I’m okay even if this is a material property and not a global setting.

Setting `skybox.material.environmentIntensity = 0.01;` doesn’t seem to do anything like `PBRMaterial` does.

Using both `scene.environmentTexture.level = x;` and `scene.environmentIntensity = x;` will result in the reflections effectively using `intensity = x^2;`.

---

<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:** [August 15, 2022, 12:53pm UTC](https://forum.babylonjs.com/t/inconsistent-lighting-with-pbrmaterial-with-scene-environmenttexture/32956/4 "2022-08-15T12:53:28Z")

</div>

You can force the material of the skybox to be pbr as well [https://www.babylonjs-playground.com/#ZEP6EV#2](https://www.babylonjs-playground.com/#ZEP6EV#2)
