# SSAO with multiple renderers

**URL:** https://discourse.vtk.org/t/ssao-with-multiple-renderers/8746
**Category:** Support
**Created:** [June 16, 2022, 1:06pm UTC](https://discourse.vtk.org/t/ssao-with-multiple-renderers/8746 "2022-06-16T13:06:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![andreasbuykx](https://discourse.vtk.org/user_avatar/discourse.vtk.org/andreasbuykx/32/8137_2.png) [@andreasbuykx](https://discourse.vtk.org/u/andreasbuykx)
#### Post date: [June 16, 2022, 1:06pm UTC](https://discourse.vtk.org/t/ssao-with-multiple-renderers/8746/1 "2022-06-16T13:06:08Z")

</div>

I’m experimenting with SSAO for our FEA application. We have a background renderer (in layer 0) that displays a gradient background and - optionally - a watermark image, and a scene renderer (in layer 1) that renders the application. When the scene renderer is switched to use SSAO the gradient background changes to a uniform background.

I reproduced several scenarios of mixing SSAO and non-SSAO renderers in attached python script:

1. single renderer with gradient bg, no SSAO
2. single renderer with gradient bg, with SSAO =\> bg is uniform
3. separate bg and scene renderer, only scene renderer with SSAO =\> bg is uniform
4. separate bg and scene renderer, both bg and scene renderer with SSAO =\> bg is uniform
5. separate bg and side-by-side scenes, one scene with SSAO =\> bg is uniform behind scene with SSAO and gradient behind scene without SSAO(!)
6. separate bg and side-by-side scenes, both scenes and BG with SSAO =\> bg is uniform behind left scene, right viewport is black(!)

Is this intended or expected behavior? I could not find any information about this in the blog or documentation.

Note: the images are generated with a mesa rendering backend. I do not readily have access to native graphics to see whether that makes a difference.

[ssao.py](https://discourse.vtk.org/uploads/short-url/up3ypEFMU8DBrfK1al3G7SF6xS9.py) (4.2 KB)

 ![single-renderer-no-SSAO_1](https://discourse.vtk.org/uploads/default/original/2X/c/c3d995654e1a99c300a889f6ce61eb6eff6a0434.png)  
 ![single-renderer-with-SSAO_1](https://discourse.vtk.org/uploads/default/original/2X/0/08aedfbec9172584cf43aa50e7d350ace97b23cf.png)  
 ![single-renderer-with-SSAO_1](https://discourse.vtk.org/uploads/default/original/2X/0/08aedfbec9172584cf43aa50e7d350ace97b23cf.png)  
 ![single-renderer-with-SSAO_1](https://discourse.vtk.org/uploads/default/original/2X/0/08aedfbec9172584cf43aa50e7d350ace97b23cf.png)  
 ![bg-2x-scene-single-SSAO_1](https://discourse.vtk.org/uploads/default/original/2X/8/8e5393e92cbd7f90e214b69e3131e227ef36249d.png)  
 ![bg-2x-scene-all-SSAO_1](https://discourse.vtk.org/uploads/default/original/2X/6/6af578e5270c8edc0f33147c25ec72863840898a.png)

---

<div class="post-metadata">

### Author: ![andreasbuykx](https://discourse.vtk.org/user_avatar/discourse.vtk.org/andreasbuykx/32/8137_2.png) [@andreasbuykx](https://discourse.vtk.org/u/andreasbuykx)
#### Post date: [June 20, 2022, 2:42pm UTC](https://discourse.vtk.org/t/ssao-with-multiple-renderers/8746/2 "2022-06-20T14:42:15Z")

</div>

@Michael Can you let me know if a gradient background should work in combination with SSAO?
