Universal Render Pipeline Post processing breaks transparent camera background?

Hey. I noticed that when I enable “Post processing” in my scene’s main camera then the transparent background I have becomes opaque again. My project uses the Universal render pipeline.

alt text

Camera background set to (0, 0, 0, 0) (Fully transparent)

alt text

I’m using OBS to display the transparency effect. I have an image in the background and then the Unity game on top of it, like an overlay

Here’s what it looks like WITHOUT post processing enabled. It works as expected.
alt text

And here’s what it looks like when I enable Post processing. The background is no longer transparent.
alt text

Any ideas why it doesn’t work with Post processing enabled?

You are clearing the camera’s colour buffer to a solid colour
_
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@7.2/manual/cameras-advanced.html
_
“At the start of its render loop, a Base Camera can clear its color buffer to a Skybox, clear its color buffer to a solid color, or use an uninitialized color buffer. You can choose this behavior using the Background Type property in the Base Camera Inspector.”
_
I think your issue is that whilst you might think you are setting it transparent with the RGBA, this is overridden when the camera’s color buffer is cleared to a solid colour (again, as stated in the docs regarding Background Type: Solid Color)

As such it appears you only have the following options:

a Base Camera can:

  • clear its color buffer to a Skybox
  • clear its color buffer to a solid color
  • or use an uninitialized color buffer
    _
    "Note that the contents of the uninitialized color buffer vary by platform. On some platforms, the unitialized color buffer will contain data from the previous frame. On other platforms, the unitialized color buffer will contain unintialized memory. You should choose to use an unitialized color buffer only if your Camera draws to every pixel in the color buffer, and you do not wish to incur the cost of an unnecessary clear operation.

_

Hi I solved this by changing the secondary camera type to Overlay and adding it to overlay stack on the primary camera.

Any solutions to this on-going problem? There’s several posts about this and no one has had a solution, just dead threads. It seems Post-processing removes alpha from camera in URP.