BUG:( HDRP in game multiple camera

Hi,
I recently imported Aline into my project and here is a problem I can’t understand how to fix…
I want to draw a simple rectangle “in-game mode”. I have multiple cameras with different depth order.
for example:
Cam A : depth = -5
Cam UI : depth = 10
all cameras and sorting orders works fine, UI show correctly over the 3D or 2D objects in other cameras.
the problem is that when I try to draw a rectangle on Cam A, it doesn’t appear on the screen at all, but when I disable the UI camera then the rectangle appears. It looks like the UI camera block the rectangle but not other objects.

Unity 2020.1.15f1
HDRP 8.2.0
ALINE 1.3.1

var draw = DrawingManager.GetBuilder(true);
draw.cameraTargets = drawingCams;
draw.WireRectangle((Vector3)docWorldCenter, Quaternion.Euler(90, 0, 0), documentSize, docBorderColor);
draw.Dispose();


Hi

Would it be possible for you to share a small example project that shows this issue? I have found that in particular when HDRP is involved it can depend a lot on the exact settings that one uses.

Thanks for your quick response. These days, I have a bad network (upload) quality and I can’t upload an HDRP sample project. (an empty HDRP project ~= 500 MB)
But I tested it in a new empty HDRP project with all default HDRP settings and default camera settings but the problem exists.
One important note is that I just found that this problem only appears in the HDRP. before I switch to the HDRP in the empty sample project everything was working fine.
after that, I tried to play with most of the HDRP and camera settings but it had no effect.
I only can draw on the top layer camera. the camera with the most depth value. other cameras with the lower depth value can’t draw anything.

Cameras settings: (draw not works)


now decrease UI camera depth value, red rectangle appear on screen.

HDRP settings: (all are default settings)