CustomPass without effect

Hello,

I want to display a HUD in VR.

So I need to set my canvas render mode in WorldSpace and use a CustomPass to render it after the post process.

Here is my CustomPass in the scene :

The layer STATIC_UI contains all UI element.
I removed this culling mask from my camera and it should be draw by this CustomPass. Unfortunately, it doesn’t work.
My UI gameObject have their layer set to STATIC_UI and if I add this culling mask to the camera, they are drawn.

I think the CustomPass is not active because I can’t find it in the frame debugger :

But it is set active in inspector. And my HDRP asset has the CustomPass enabled.

I wonder what I have done wrong… ?


I just figure out that if the gameObject where the CustomPassVolume is has a layer different from default, it just won’t work at all. Not present in frame debugguer, no breakpoint executed in code etc.

Why !? Is this a bug ?

Hello,

I believe that your issue is caused by the camera volume mask parameter:

By default, only the camera is only affected by volumes and custom pass volumes on the default layer

Ah yes, that is probably the reason, thank you !