# Issue with shadow

**URL:** <https://discourse.threejs.org/t/issue-with-shadow/21167>\
**Category:** Questions\
**Tags:** shadows, geometry\
**Created:** [December 2, 2020, 10:35am UTC](https://discourse.threejs.org/t/issue-with-shadow/21167 "2020-12-02T10:35:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/alex/32/9027_2.png) [@Alex](https://discourse.threejs.org/u/Alex)\
**Post date:** [December 2, 2020, 10:35am UTC](https://discourse.threejs.org/t/issue-with-shadow/21167/1 "2020-12-02T10:35:44Z")

</div>

Hello All,

I am getting issue with the shadows here i am using custom buffer geometry with MeshStandardMaterial.  
Here when i am enabling the receiveshadow means

mesh.receiveShadow = true

Than i am getting blurry black shades on my plates even there is no objects near to it ![shadow](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/5/5c106e493472d886fa04989dda15e5e8fc323860.png)

Here if we see the plates so they have proper shadows on the ground but there as shadows on themselve too that i dont want because no object is new to them. Also if the objects are near i want the shadow like i have on the ground on this plate  
Please can anyone tell me the reason and even my other objects (plates are not receiving shadows properly)

Thanks

---

<div class="post-metadata">

**Author:** ![Alex](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/alex/32/9027_2.png) [@Alex](https://discourse.threejs.org/u/Alex)\
**Post date:** [December 3, 2020, 8:36am UTC](https://discourse.threejs.org/t/issue-with-shadow/21167/2 "2020-12-03T08:36:41Z")

</div>

That black effect i remove now i added the emmensive property

---

<div class="post-metadata">

**Author:** ![Bossie](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/bossie/32/14371_2.png) [@Bossie](https://discourse.threejs.org/u/Bossie)\
**Post date:** [December 3, 2020, 10:06am UTC](https://discourse.threejs.org/t/issue-with-shadow/21167/3 "2020-12-03T10:06:29Z")

</div>

Just a wild guess, but maybe try increasing the shadowmap size?

---

<div class="post-metadata">

**Author:** ![Fluqz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fluqz/32/6279_2.png) [@Fluqz](https://discourse.threejs.org/u/Fluqz)\
**Post date:** [December 3, 2020, 10:30am UTC](https://discourse.threejs.org/t/issue-with-shadow/21167/4 "2020-12-03T10:30:12Z")

</div>

Some options that might help

```
renderer.setPixelRatio(ratio) 
renderer.setSize(width, height)
renderer.shadowMap.type = THREE.PCFSoftShadowMap

light.shadow.mapSize.width = 4096
light.shadow.mapSize.height = 4096
```

---

<div class="post-metadata">

**Author:** ![Alex](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/alex/32/9027_2.png) [@Alex](https://discourse.threejs.org/u/Alex)\
**Post date:** [December 3, 2020, 11:15am UTC](https://discourse.threejs.org/t/issue-with-shadow/21167/5 "2020-12-03T11:15:03Z")

</div>

@Fluqz and @Bossie thank you so much for the valuable solution. Fluqz yes i already tried these setting an it help me in getting the proper shadows but that black effect on the table goes away when i applied the emmensive property on the material.

---

<div class="post-metadata">

**Author:** ![Alex](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/alex/32/9027_2.png) [@Alex](https://discourse.threejs.org/u/Alex)\
**Post date:** [December 6, 2020, 12:57pm UTC](https://discourse.threejs.org/t/issue-with-shadow/21167/6 "2020-12-06T12:57:32Z")

</div>

At an certain position of light my shadows are faded not sharp. I want them to be sharp  
Please see the image

My shadow camera settings are left = -0.8, right = 0.8 top=0.8 bottom=-0.8

Near and far parameter are 0.001, 1000

map size is 2048\*20

![bug](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/3/307c9e81d83cbcde752881791e607eeff2c54f7e.png)

What should be the recoomended ratio in setPixel method suggested above

---

<div class="post-metadata">

**Author:** ![Fluqz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fluqz/32/6279_2.png) [@Fluqz](https://discourse.threejs.org/u/Fluqz)\
**Post date:** [December 7, 2020, 11:51am UTC](https://discourse.threejs.org/t/issue-with-shadow/21167/7 "2020-12-07T11:51:13Z")

</div>

Dont know how to sharpen shadows. There are different light types. You should check them out in the docs and play with them.

mapSize 2048\*20 is quite a lot, maybe tweak here a bit as well

The ratio is calculated by dividing width and height  
`let ratio = width / height;`
