# Soft Shadow example

**URL:** <https://forum.babylonjs.com/t/soft-shadow-example/17690>\
**Category:** Questions\
**Created:** [January 21, 2021, 12:20pm UTC](https://forum.babylonjs.com/t/soft-shadow-example/17690 "2021-01-21T12:20:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rizn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rizn/32/14163_2.png) [@Rizn](https://forum.babylonjs.com/u/Rizn)\
**Post date:** [January 21, 2021, 12:20pm UTC](https://forum.babylonjs.com/t/soft-shadow-example/17690/1 "2021-01-21T12:20:52Z")

</div>

Hi. Iam new to BJS.

I just want to ask, if this shadow-example is possible with BJS without too much knowledge?  
Maybe there is a playground already to learn about those soft shadows?

[![](https://cdn.prod.www.spiegel.de/images/9f27cebc-cd3b-4d7e-b682-daf4022c6e4d_w948_r1.77_fpx48_fpy54.jpg) ](https://cdn.prod.www.spiegel.de/images/9f27cebc-cd3b-4d7e-b682-daf4022c6e4d_w948_r1.77_fpx48_fpy54.jpg)

Thanx

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [January 21, 2021, 12:26pm UTC](https://forum.babylonjs.com/t/soft-shadow-example/17690/2 "2021-01-21T12:26:54Z")

</div>

Welcome aboard!

Yes, soft shadows are easy to setup:

[https://playground.babylonjs.com/#FH3FM2#11](https://playground.babylonjs.com/#FH3FM2#11)

> **[Shadows | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/lights/shadows#soft-shadows-1)**
>
> Learn how to leverage shadows in Babylon.js

---

<div class="post-metadata">

**Author:** ![Rizn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rizn/32/14163_2.png) [@Rizn](https://forum.babylonjs.com/u/Rizn)\
**Post date:** [January 22, 2021, 1:09pm UTC](https://forum.babylonjs.com/t/soft-shadow-example/17690/3 "2021-01-22T13:09:48Z")

</div>

thank you Evgeni.

---

<div class="post-metadata">

**Author:** ![mimeeq3d\_neal](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mimeeq3d_neal/32/13877_2.png) [@mimeeq3d\_neal](https://forum.babylonjs.com/u/mimeeq3d_neal)\
**Post date:** [January 22, 2021, 6:50pm UTC](https://forum.babylonjs.com/t/soft-shadow-example/17690/4 "2021-01-22T18:50:16Z")

</div>

I just happen to notice that the sandbox example runs at 5fps on my Macbook M1, I have never seen such a slow result, is there something special going on here to cause that  
I was checking all shadows documentation and all other examples are running at 60fps

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [January 22, 2021, 7:53pm UTC](https://forum.babylonjs.com/t/soft-shadow-example/17690/5 "2021-01-22T19:53:35Z")

</div>

It is using PCSS as the shadow filtering technic, which is the most taxing one for performances. Not recommended for less capable GPU…

---

<div class="post-metadata">

**Author:** ![mimeeq3d\_neal](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mimeeq3d_neal/32/13877_2.png) [@mimeeq3d\_neal](https://forum.babylonjs.com/u/mimeeq3d_neal)\
**Post date:** [January 23, 2021, 7:46pm UTC](https://forum.babylonjs.com/t/soft-shadow-example/17690/6 "2021-01-23T19:46:28Z")

</div>

thanks for clarifying @Evgeni_Popov

---

<div class="post-metadata">

**Author:** ![Rata\_Blanca](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rata_blanca/32/24779_2.png) [@Rata\_Blanca](https://forum.babylonjs.com/u/Rata_Blanca)\
**Post date:** [February 20, 2023, 4:13pm UTC](https://forum.babylonjs.com/t/soft-shadow-example/17690/7 "2023-02-20T16:13:43Z")

</div>

> [@Evgeni\_Popov](#):
>
> It is using PCSS as the shadow filtering technic, which is the most taxing one for performances. Not recommended for less capable GPU…

Is this related to soft shadows only or for both: soft and hard shadow types also?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 20, 2023, 6:21pm UTC](https://forum.babylonjs.com/t/soft-shadow-example/17690/8 "2023-02-20T18:21:34Z")

</div>

These kind of soft shadows (like the screenshot in the first post) can only be achieved with PCSS (which is the most taxing on performance). Or it can be faked (if shadows are static, you can bake them in your texture).
