# Adding SSAO pass to a scene in threejs

**URL:** <https://discourse.threejs.org/t/adding-ssao-pass-to-a-scene-in-threejs/48539>\
**Category:** Questions\
**Tags:** ssao\
**Created:** [February 28, 2023, 12:08pm UTC](https://discourse.threejs.org/t/adding-ssao-pass-to-a-scene-in-threejs/48539 "2023-02-28T12:08:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AkashNS](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@AkashNS](https://discourse.threejs.org/u/AkashNS)\
**Post date:** [February 28, 2023, 12:08pm UTC](https://discourse.threejs.org/t/adding-ssao-pass-to-a-scene-in-threejs/48539/1 "2023-02-28T12:08:32Z")

</div>

![ssao](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/f/3/f33b91e1455f1c663ce66b52167a5796f6075d54.png)

Hello! I have added SSAO pass to the above image scene. But I do not want the SSAO pass to be implemented on the plane below the cube as it is displaying lines like in the image above.  
Can anyone help me with that?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [February 28, 2023, 1:53pm UTC](https://discourse.threejs.org/t/adding-ssao-pass-to-a-scene-in-threejs/48539/2 "2023-02-28T13:53:26Z")

</div>

There is no easy way to implement what you are looking for since the ambient occlusion is applied to the entire image by default. You probably need a similar approach like in [webgl\_postprocessing\_unreal\_bloom\_selective](https://threejs.org/examples/#webgl_postprocessing_unreal_bloom_selective) which only applies bloom to selected objects.

---

<div class="post-metadata">

**Author:** ![AkashNS](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@AkashNS](https://discourse.threejs.org/u/AkashNS)\
**Post date:** [March 1, 2023, 5:51am UTC](https://discourse.threejs.org/t/adding-ssao-pass-to-a-scene-in-threejs/48539/3 "2023-03-01T05:51:58Z")

</div>

Okay! Thank you. The main intention is to remove the jagged lines(displayed beheind the model in the attached picture) from the screen while implementing SSAOPass. Any inputs would be appreciated.

 ![ssao](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/6/9/6903a52960b306417d62baf1f1fc7ba8a2952f33.jpeg)

---

<div class="post-metadata">

**Author:** ![AkashNS](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@AkashNS](https://discourse.threejs.org/u/AkashNS)\
**Post date:** [March 2, 2023, 7:16am UTC](https://discourse.threejs.org/t/adding-ssao-pass-to-a-scene-in-threejs/48539/4 "2023-03-02T07:16:05Z")

</div>

The jagged lines are appearing on the objects which are transparent(transparency:true). Any reason why this is happening?
