Search Issue Tracker

Third Party Issue

Votes

0

Found in

2020.3.47f1

2021.3.24f1

2022.2.17f1

Issue ID

UUM-33945

Regression

No

Full Screen Compute Shader in SPI throws "Compute shader: Property (_CameraOpaque) at kernel index (0) has mismatching texture dimension (expected 2, got 5)" exception

--

-

Steps to reproduce:
1. Open the attached user's project from the Dropbox link "compute-xr-test.zip"
2. Make sure MockHMD plugin is enabled
3. Make sure Single Pass Instanced is selected
4. Enter Play Mode
5. Observe the Exception message

Expected results: When rendering a full-screen pass using a compute shader in URP with VR SPI in the Mock HMD Plugin, left and right eyes are rendered correctly
Actual Results: When rendering a full-screen pass using a compute shader in URP with VR SPI in the Mock HMD Plugin, Unity renders the left eye gray and the right eye black with an exception

Reproducible with: URP 10.10.1, 12.1.11, 14.0.7 (2020.3.47f1, 2021.3.24f1, 2022.2.17f1)
Could not test on 2023.1.0b13 and 2023.2.0a11 due to exceptions of obsolete methods after upgrading the project

Environment: Windows 10 22H2

Notes:
-Issue does not reproduce when using Multi-Pass or VR is disabled
-Issue reproduces with OculusXR and OpenXR plugins when Single Pass Instanced is selected
-Exception message:
"Compute shader (XRComputeTest): Property (_CameraOpaque) at kernel index (0) has mismatching texture dimension (expected 2, got 5)"

  1. Resolution Note:

    This issue is a combination of multiple issues.

    1. The compute shader error comes from custom shader.
    The error message is a bit vague: Compute shader (XRComputeTest): Property (ColorBlitHandle) at kernel index (0) has mismatching output texture dimension (expected 2, got 5)
    It translates to expected 2D, got 2DArray . Meaning that ColorBlitHandle you get there is a texture array but shader expects it to be 2D
    Custom shader needs to fix this mismatch.

    2. The grey screen issue is due to cmd.Blit usage. The cmd.Blit will break XR single pass rendering due to it's internal shader keyword management logic and should be avoided.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.