Cull a Screen Space - Overlay canvas on camera.

Hello all,
I’m currently working on a project and struggling with a small issue.
I’m almost done working on Blur Effect and the last issue I have is that I need to cull, or make invisible, a Screen Space - Overlay Canvas from a Camera.
I’m currently using a main camera to draw the entire screen for gameplay purpose, and another one to create a Texture, Blur it using a RenderTexture and then apply it to an UI, creating an effect similar to the Apple system UI.
I was able to include all UIs inside the Texture I make, in order to blur UIs on the background.
The downside is that ALL the UIs are included inside the Texture before the “Blur” operations, including the one in foreground which shouldn’t blurred. Of course this is not ideal.
I thought I would be able to not show the foreground UI by simply set it on a Particular “Layer” and then remove the it from the second camera culling mask. Unlucky this effect (which work on Screen Space - Camera setting) is totally ignored on Screen Space - Camera Overlay UIs.
At this time converting the entire UI to Screen Space - Camera is not a valuable option for us.
Do anyone of you know if there’s another way to cull a particular Screen Space - Camera Overlay UI from a camera?
Thank you in advice.

1 Like

I would like to know the answer to this to …

Bump…is this even possible?

This would cull all canvases you could narrow it to a tagged canvas perhaps

foreach (CanvasRenderer canvas in GameObject.FindObjectsOfType<CanvasRenderer>()) {
            canvas.cull = true;
}
2 Likes

just work!!! thank you