Render Texture ignoring Camera Culling Mask after upgrade to 2022.3.18 (HDRP 14.0.10)

Hi! After upgrading my HDRP project from 2022.3.16 to 2022.3.18, I’ve noticed that my Render Textures are not working.

I have 3 cameras in the scene:

  • Main Camera - layer culling set to everything except “Char Models”
  • Char 1 Camera - layer culling set to “Char Models” only. Renders to “Char1RT” render texture.
  • Char 2 Camera - layer culling set to “Char Models” only. Renders to “Char2RT” render texture.

The two RenderTextures are exposed via two RawImage components, both in the “UI” layer. This layer is only visible by Main Camera, via it’s Culling Mask.

After upgrading to 2022.3.18, the RenderTexture cameras seem to be ignoring the Culling Mask - they are rendering the UI components, which in turn renders the RenderTexture, which then renders the UI… So I’m getting an “infinite reflections” thing going on.

There also seems to be weird flickering on the UI when I’d editing it, and flickering in run-time. When editing Canvases and Panels, the UI is resizing, flickering and jumping around.

Highly likely to be user error, but is anyone else seeing weird UI stuff in 2022.3.18, including strange behaviour of Render Textures?

Thanks!

2 Likes

Running into the same issue in 2022.3.20f1. Target textures on cameras seem to ignore Culling Mask layers, unless I’m doing something wrong

1 Like

Same issue, RenderTextures get the UI no matter what. Even if i check no layers in culling masks.
And this, even if the canvas is set to Screen space - Camera

EDIT: Actually, RenderTextures just render all of them disregarding of any culling masks

EDIT : Found the issue.

it IS NOT a bug from culling mask of the render cameras. But you are probably like me using this camera to read the pixels out of it.
Well maybe you call ReadPixels() at the wrong moment, because for me it read pixels from the wrong camera (the active camera, not the camera that renders in the rendertexture), so the cullmask is obviously not the one you set on the camera you actually wanted to read pixels from.

(Sorry bad english)