SSAO with multiple renderers

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 (4.2 KB)






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