Multi Camera post processing

I am trying to find resources about what’s possible in the latest version (2021.1.17)

I am trying to render the majority of the scene darker and blurred.
On top I want to render selected objects and one UI canvas sharp and bright.

Usually I’d use two cameras, one for layer “Environment” and the other layer “Selected”, and assign a post process volume to the camera rendering the environment.


This example I created using the built-in renderer and Post Processing v2

How does this work in HDRP?

I take it camera stacking does not work?

HDRP can use multiple camera’s however, camera stacking isn’t supported.

I would look into Custom render passes and a good injection point and use of render textures instead, it’s going to be more handy in the long run.

https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.1/manual/Custom-Pass.html

Camera stacking is supported, but thru the Graphic Compositor. But its near impossible to figure out how it works.

1 Like

Ive kind of made it work with Graphic Compositor, but its strange that this way it was suppose to minimize the number of cameras, so its easier on the puter. But instead of having 2 cameras as in URP camera stack, im using 3 now in HDRP.
1 camera for the perspective view, 1 camera for the orthographic view, and 1 main projection.
Dont know how else im suppose to do according to the docs.

1 Like

ah yes of course!
The only downside id caution is that in some cases users may not be using the 16 bit half alpha channel in colour and post stencils in their project. and depending on the post effects TAA may also be a requirement to remove jitter ( which could also end up problematic depending on your scene.

We tend to use it for better depth of field rendering in general but it might not always be something in budget and like you mentioned, it can lead to drawing errors in the alpha stencil layers if you’re not used to it.
Well worth looking into though for the OP.

Maybe thats why my game is so jittery.
My HDRP physics is so messed up at the moment.
Its not a hardware issue, but i think unity is having problems.
The player movement is not moving smoothly forward. and im trying to find out why. might be this 2 camera/3 camera setup im having/had in URP/HDRP.
something is very wrong.

hrmm, I’d maybe look into the Custom Frame Settings Per camera.

I’d take a stab that the RP > Asset > Global Frame Settings > Frame settings > Volumes > Cameras,
works similar to the volume system in general.
So whatever is primarily enabled will be enabled to the next unless told otherwise.

for your framing overlay cameras, you can probably check the custom frame setting and disable all that doesn’t apply to that camera, so that it isn’t processed twice or more depending on your stack.

in general, camera stacking in HDRP is going to have a high processing cost compared to all the other Graphics Compositor methods, there may not be much wiggle room for all use cases/budgets.

7467599--917300--custom frame settings Camera.png

thanx. ill have a go at it. its probably something like it doing all that you say.
Ive made a generic HDRP test project with 1 camera and what ive seen, its nothing wrong yet.

1 Like

Np
Best of luck :slight_smile: