# How disable shading on the mesh?

**URL:** <https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573>\
**Category:** Questions\
**Tags:** lighting, shader\
**Created:** [July 17, 2019, 4:53pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573 "2019-07-17T16:53:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [July 17, 2019, 4:53pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/1 "2019-07-17T16:53:36Z")

</div>

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/6/6628bd171f1388f81303aa120815750974446c04.jpeg)

How I can disable shading on my model?  
On the screenshot I show shadows on face with inverted normal.

Something like “lit mode” from Unreal Engine…

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/d/da883f04ac2adc5f9093aa252e86e1ffd5200b79.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/6/6324c992de18be01206b6215ebdff81915242b16.jpeg)

But when I setup `material.unlit=true` mesh lose textures include `reflectionTexture` and got black color.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 17, 2019, 5:17pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/2 "2019-07-17T17:17:43Z")

</div>

Hey!

you can set material.emissiveColor to white, or material.disableLightning to true

Both should work

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [July 18, 2019, 1:48pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/3 "2019-07-18T13:48:22Z")

</div>

`.emissiveColor = new Color3(1,1,1);` made mesh white color, but now mesh lost `reflectionTexture`

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/0/0aaec1db4710f5c53b6067acfeac91454476d13b.png)

`.disableLighting = true;` I dont know what it made for mesh, but shading still here.  
I think it because in my scene no any lights.

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/8/81c2d45207ef81bbe7452b1d0498d7078304c3da.png)

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 18, 2019, 2:42pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/4 "2019-07-18T14:42:17Z")

</div>

Can you share a repro in the playground?

---

<div class="post-metadata">

**Author:** ![aWeirdo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aweirdo/32/52_2.png) [@aWeirdo](https://forum.babylonjs.com/u/aWeirdo)\
**Post date:** [July 18, 2019, 3:10pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/5 "2019-07-18T15:10:30Z")

</div>

Difficult for us to do anything without a pg ^^

i don’t know which light(s) you’re using…  
but try this for a Hemi ( comment out line 31 to see the difference )  
[https://playground.babylonjs.com/#PIW7ST](https://playground.babylonjs.com/#PIW7ST)

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [July 18, 2019, 3:11pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/6 "2019-07-18T15:11:20Z")

</div>

> [@Deltakosh](#):
>
> Can you share a repro in the playground?

How ca I upload my model to playground?

---

<div class="post-metadata">

**Author:** ![aWeirdo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aweirdo/32/52_2.png) [@aWeirdo](https://forum.babylonjs.com/u/aWeirdo)\
**Post date:** [July 18, 2019, 3:13pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/7 "2019-07-18T15:13:17Z")

</div>

> **[Build software better, together](https://github.com/)**
>
> GitHub is where people build software. More than 36 million people use GitHub to discover, fork, and contribute to over 100 million projects.

[https://doc.babylonjs.com/resources/external\_pg\_assets](https://doc.babylonjs.com/resources/external_pg_assets)

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [July 19, 2019, 10:48am UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/8 "2019-07-19T10:48:56Z")

</div>

Thanks, I made playground and still doesnt realize how can fix this problem

[https://playground.babylonjs.com/#PIW7ST#4](https://playground.babylonjs.com/#PIW7ST#4)

PS Model look like broken, but this effect I see on the good some curved models but on them not so strong.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 19, 2019, 3:01pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/9 "2019-07-19T15:01:47Z")

</div>

It seems to be a vertex normal issue in your mesh. All green colors mean that your normal are not correctly oriented:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/3/34c74dc202b0f9c0f7d57307bd2552d88b971c16.jpeg)

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [July 19, 2019, 3:28pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/10 "2019-07-19T15:28:27Z")

</div>

It is flat model, from other side these faces have right orient.  
Anyway, on the models with more “righted” normal orientation I still see shading effect, and I need disable it.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 19, 2019, 3:36pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/11 "2019-07-19T15:36:53Z")

</div>

shading is off here:  
[https://playground.babylonjs.com/#PIW7ST#5](https://playground.babylonjs.com/#PIW7ST#5)

But still not sure what to look at 😃

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [July 19, 2019, 4:37pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/12 "2019-07-19T16:37:05Z")

</div>

> [@Deltakosh](#):
>
> shading is off here:

Yep, i tried these options. I want just flat model, without any shading, just reflection map and nothing more =)  
As I know normals use for shading, so I want disable them processing in my scene. Seems like it low level render feature 🤔

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 19, 2019, 5:00pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/13 "2019-07-19T17:00:03Z")

</div>

But this is what you have: Only reflection 🙂

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [July 19, 2019, 5:03pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/14 "2019-07-19T17:03:15Z")

</div>

Reflection and shading. No, shading I did not want

One more playground [https://playground.babylonjs.com/#PIW7ST#6](https://playground.babylonjs.com/#PIW7ST#6)

Here more regular model with “broken” shading:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/2/2da47ac66ffea330b1f10fb12a2fffdcb306f42e.png)

But if apply morph to 1, then shding will fixed:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/c/c658b5b6213464034cf7f9af12898c74988da816.png)

but morphing doesn change normals.  
In Blender normals before morph

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

and after

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

And I dont realize what happen here:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/5/57b715306d040547236957a60b0565bf7c95a3f6.jpeg)

---

<div class="post-metadata">

**Author:** ![aWeirdo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aweirdo/32/52_2.png) [@aWeirdo](https://forum.babylonjs.com/u/aWeirdo)\
**Post date:** [July 19, 2019, 6:35pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/15 "2019-07-19T18:35:44Z")

</div>

If i understood correctly, you don’t want any **black** spots or areas…  
I assume (without looking deeper) that this is due to some ancient math issue (something \* 0 = black)

well, i gave it a go and added some emissive,  
this is the best i can get it, [https://playground.babylonjs.com/#PIW7ST#8](https://playground.babylonjs.com/#PIW7ST#8)

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [July 22, 2019, 9:36am UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/16 "2019-07-22T09:36:24Z")

</div>

> [@aWeirdo](#):
>
> If i understood correctly, you don’t want any **black** spots or areas…

Yes! =)

> [@aWeirdo](#):
>
> well, i gave it a go and added some emissive,

I tried something like this and it looks like hacking, but in fact dont fixed.  
And the depend from infulence working just with one morpth, but what will be when morphing target are several with non zero value?  
But this decision better then nothing! Currently I will use it.

And I still dont understand why when I setup morph target to 1.0 shading are correctly (as I expect).

ps. sorry for my english, its really hard to describe .)

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [July 22, 2019, 9:47am UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/17 "2019-07-22T09:47:54Z")

</div>

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

I think to have found trouble — on the model some vertextes does not connected

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 22, 2019, 3:48pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/18 "2019-07-22T15:48:51Z")

</div>

Ok sounds better because it was definitely not an issue with lighting as it was off

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [July 23, 2019, 5:06pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/19 "2019-07-23T17:06:19Z")

</div>

But shading still persist on the inverted faces and way for disable shading not found

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 23, 2019, 5:19pm UTC](https://forum.babylonjs.com/t/how-disable-shading-on-the-mesh/4573/20 "2019-07-23T17:19:38Z")

</div>

There is no shading 🙂 you turned of the shading with disableLighting = true

This is weird reflection due to weird normals
