# Material ignore shadow

**URL:** <https://discourse.threejs.org/t/material-ignore-shadow/3116>\
**Category:** Questions\
**Tags:** shadows, materials\
**Created:** [June 14, 2018, 12:59pm UTC](https://discourse.threejs.org/t/material-ignore-shadow/3116 "2018-06-14T12:59:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldsilverback](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@oldsilverback](https://discourse.threejs.org/u/oldsilverback)\
**Post date:** [June 14, 2018, 12:59pm UTC](https://discourse.threejs.org/t/material-ignore-shadow/3116/1 "2018-06-14T12:59:01Z")

</div>

Is it possible to tell materials to not receive shadows.  
I don´t mean via receiveShadow = true|false, but if you have multimaterials …aka an material´s array [MeshBasicMaterial, ShadowMaterial]

…can I tell f.e. MeshBasicMaterial to ignore shadow, and just use ShadowMaterial´s shadow?

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [June 14, 2018, 1:37pm UTC](https://discourse.threejs.org/t/material-ignore-shadow/3116/2 "2018-06-14T13:37:08Z")

</div>

`THREE.MeshBasicMaterial()` receives shadows?

---

<div class="post-metadata">

**Author:** ![TheJim01](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/thejim01/32/2007_2.png) [@TheJim01](https://discourse.threejs.org/u/TheJim01)\
**Post date:** [June 14, 2018, 2:47pm UTC](https://discourse.threejs.org/t/material-ignore-shadow/3116/3 "2018-06-14T14:47:31Z")

</div>

> [@prisoner849](#):
>
> `THREE.MeshBasicMaterial()` receives shadows?

No, it doesn’t. I believe what @oldsilverback is asking is if he can use the shadow map from one material on another material. My knee-jerk reaction is “no” but I’m not familiar enough with shadows to say definitively.

---

<div class="post-metadata">

**Author:** ![oldsilverback](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@oldsilverback](https://discourse.threejs.org/u/oldsilverback)\
**Post date:** [June 14, 2018, 3:02pm UTC](https://discourse.threejs.org/t/material-ignore-shadow/3116/4 "2018-06-14T15:02:41Z")

</div>

Sorry, not MeshBasic but THREE.MeshStandardMaterial

Nevertheless that´s not the point. The point was if there´s a param ignoreShadow or some so tell one material in an material´s array (multimaterial) for one mesh to not receive a shadow, whilst just another material receives it.

This way we could use the ShadowMaterial and benefit from it´s opacity param to dim/enlighten shadow´s darkness

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [June 14, 2018, 3:45pm UTC](https://discourse.threejs.org/t/material-ignore-shadow/3116/5 "2018-06-14T15:45:01Z")

</div>

Do you mean that would like to have, say, a cube, with a different material on each face, and have shadows on some faces and not on others?

---

<div class="post-metadata">

**Author:** ![Fyrestar](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fyrestar/32/52793_2.png) [@Fyrestar](https://discourse.threejs.org/u/Fyrestar)\
**Post date:** [June 14, 2018, 5:21pm UTC](https://discourse.threejs.org/t/material-ignore-shadow/3116/6 "2018-06-14T17:21:13Z")

</div>

Actually this would be a reasonable addition letting materials decide to cast or receive shadows as well.

There isn’t such an option yet as far as i know, besides changing the code there should be a chance to modify the shaders program after it has been created.

Or in src/renderers/webglWebGLPrograms.js changing line 190

> shadowMapEnabled: renderer.shadowMap.enabled && object.receiveShadow && lights.shadows.length \> 0,

with

> shadowMapEnabled: renderer.shadowMap.enabled && ( object.receiveShadow || ( object.material && object.material.receiveShadow ) ) && lights.shadows.length \> 0,

should make it available.
