# Applying GTAO postprocessing to only some objects

**URL:** <https://discourse.threejs.org/t/applying-gtao-postprocessing-to-only-some-objects/72798>\
**Category:** Questions\
**Tags:** postprocessing, ambient-occlusion\
**Created:** [October 14, 2024, 1:53pm UTC](https://discourse.threejs.org/t/applying-gtao-postprocessing-to-only-some-objects/72798 "2024-10-14T13:53:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mattia\_Savoia](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mattia_savoia/32/48418_2.png) [@Mattia\_Savoia](https://discourse.threejs.org/u/Mattia_Savoia)\
**Post date:** [October 14, 2024, 1:53pm UTC](https://discourse.threejs.org/t/applying-gtao-postprocessing-to-only-some-objects/72798/1 "2024-10-14T13:53:43Z")

</div>

Hello everyone. I use GTAO as a post-processing effect. Is it possible to apply this effect only to some objects in the scene and not to others? Obviously it would be necessary to consider the Depth Buffer and transparencies.

---

<div class="post-metadata">

**Author:** ![mjurczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mjurczyk/32/10995_2.png) [@mjurczyk](https://discourse.threejs.org/u/mjurczyk)\
**Post date:** [October 19, 2024, 2:37pm UTC](https://discourse.threejs.org/t/applying-gtao-postprocessing-to-only-some-objects/72798/4 "2024-10-19T14:37:10Z")

</div>

Should be 100% possible, but you’d need to code a masking postprocessing - first run a postprocessing pass that renders the entire scene in black and only the target objects in pure white without shading - then multiply the GTAO pass by the result of that masking pass.
