# \[Solved\] How to use envMap in ShaderMaterial based on MeshPhongMaterial

**URL:** <https://discourse.threejs.org/t/solved-how-to-use-envmap-in-shadermaterial-based-on-meshphongmaterial/13003>\
**Category:** Questions\
**Tags:** phong-material, shader-material, materials, shaders\
**Created:** [February 24, 2020, 5:18pm UTC](https://discourse.threejs.org/t/solved-how-to-use-envmap-in-shadermaterial-based-on-meshphongmaterial/13003 "2020-02-24T17:18:24Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Bzaba](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/bzaba/32/9454_2.png) [@Bzaba](https://discourse.threejs.org/u/Bzaba)\
**Post date:** [February 25, 2020, 4:39pm UTC](https://discourse.threejs.org/t/solved-how-to-use-envmap-in-shadermaterial-based-on-meshphongmaterial/13003/7 "2020-02-25T16:39:01Z")

</div>

Wow. Thank You!

What I was expecting is that because I am the one who choses to use `THREE.ShaderLib.phong`, that I am the one responsible of feeding it with proper `defines`. Thats why I was trying to just find all required uniforms and defines.

Your solution although is so clean.

---

_[View the full topic](https://discourse.threejs.org/t/solved-how-to-use-envmap-in-shadermaterial-based-on-meshphongmaterial/13003)._
