Rendering images with post processing AO

Hello,

I am trying to render images, while using Post Processing Stack v2 Ambient Occlusion.

Camera’s background Color when rendering is (1,0,0,0 or 0,0,0,0).

  1. I create a RenderTexture with depth 24.
  2. I create a Texture2D with TextureFormat.ARGB32 and mipmap false.
  3. I set the active render textures and use cam.Render().
  4. Read the pixels to Texture2D and Apply().
  5. Encode to PNG and save the file.

The problem is that when I use PPS v2 ambient occlusion effect, I get transparent areas in the pictures, instead of the solid black color I chose in AO settings.

The resulting example image: Click here for Image

Is there any way to get the background to be the solid color I chose, instead of alpha?

Your help is much appreciated,
Thank you!

Is this the right place to ask this question?

Try RGBA32 instead of ARGB32 and see if that helps.