# \[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:** 5

<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, 2:26pm UTC](https://discourse.threejs.org/t/solved-how-to-use-envmap-in-shadermaterial-based-on-meshphongmaterial/13003/5 "2020-02-25T14:26:57Z")

</div>

I don’t think missing `envMap` in `ShaderMaterial` is an issue. I would expect it has to be defined as `uniform` (and probably some `defines`). But I am newbie, so I might be wrong,

I updated your fiddle to present 2 cubes. One with standard `MeshPhongMaterial` and one with `ShaderMaterial`.

[https://jsfiddle.net/p23rd7ft/10/](https://jsfiddle.net/p23rd7ft/10/)

---

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