Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,16 @@ internal void SetupXRStates()
throw new NotImplementedException("Only 1 XR display is supported.");

XRDisplaySubsystem display = xrDisplayList[0];
if(display.GetRenderPassCount() == 0)
// case 1074030 is having issues of flood wanrings complaining about cinemachine brain conflicting with xr camera.
// This is due to ShouldUseVRFieldOfView() returning true in Camera::SetVerticalFieldOfView because we have a vr device.
// URP 10.0.0 fixed this using https://github.com/Unity-Technologies/Graphics/pull/22 by setting disableLegacyRenderer to true
// to force a VRDeviceToXRDisplaySetup::TeardownShimFuncs(*this);. This is so there's no function override left in
// the shim table when calling UninstallVRDeviceShims from ProcessPendingTextureRequestsSynchronized which will finally
// call ShimTeardownIfActive(); to finally reset completely the legacy render device s_LegacyDevice = NULL;.which allows
// ShouldUseVRFieldOfView() to return false and therefore not throw a warning in Camera::SetVerticalFieldOfView.
display.disableLegacyRenderer = true;

if (display.GetRenderPassCount() == 0)
{
// Disable XR rendering if display contains 0 renderpass
if(!xrSkipRender)
Expand Down