Rendering Issues in VR with a second virtual camera

Avatar

I am trying to use this package to draw lines in VR space, but I also have a separate camera that renders the scene to a texture. I intended to use Immediate mode to draw exactly the lines I need.

First I tried PolylinePaths, but these didn't render in the Headset in "Single Pass Instanced \ Multi-view", but they were visible to the second camera. When I switched to Multi-Pass, they got rendered in both. However, I also tried to emulate end-caps by rendering a Disc at the first and the last point, but I could not get them to render on the second camera, regardless of OpenXR Render Mode.

Unrelated: I also noticed that the PolylinePath.Thickness (ThicknessSpace.Meters) did not get modified by the scale in Draw.Matrix and I had to scale it down manually to fit the Discs or Lines.

I then tried to render a single Line for each segment, with round end-caps, but these had the same problem. They rendered fine in the VR view, but were invisible to the second camera.


Lastly tried to use the Polyline and Disc Components instead of immediate mode, and these worked fine. They were visible in both cameras, and the Polyline thickness also gets modified correctly when a parent is scaled.

I am not sure if that is a known limitation of Immediate Mode Drawing or if there even is anything that can be done about it, but I thought I'd mention it here. Personally, I would have preferred to use Immediate Mode, but I can work with the Components.

Reporting a bug? please specify Unity version:
6000.1.10f1
Reporting a bug? please specify Shapes version:
4.5.1
Reporting a bug? please specify Render Pipeline:
URP