Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2019.4.X, 2020.3.X, 2021.1.X

Votes

0

Found in

2019.4

2020.1

2020.1.8f1

2020.2

2021.1

Issue ID

1284715

Regression

No

[XR SDK] SSAO Pro from Asset Store is broken/inverted when Single Pass Instanced rendering mode is used

XR SDK

-

Reproduction steps:
1. Open the attached project ("ShaderRepro.zip")
2. Open the "SampleScene" scene
3. Enable MockHMD XR plugin (Project Settings -> Mock HMD Loader)
4. Set MockHMD Stereo Rendering Mode to Single Pass Instanced
5. Enter Play mode

Expected result: SSAO Pro effect behaves as in Multi Pass Stereo Rendering Mode
Actual result: SSAO Pro effect is broken/inverted

Reproducible with: XR SDK 3.2.17 2019.4.16f1, 2020.1.17f1, 2020.2.1f1, 2021.1.0s10
Not reproducible with: 2018.4.30f1 (XR SDK not available)

Tested:
- Oculus Rift S
- MockHMD

  1. Resolution Note (fix version 2021.2):

    Fixed with 2021.2.0a10, backported to 2021.1.22f1, 2020.3.18f1, 2019.4.31f1

    We've identified the issue preventing the correct generation of the depth normals texture. A fix will for Unity will follow.

    Note that in order to use single-pass instanced, you need to fix your shader code with the following edits in order to correctly sample from texture-array :
    //sampler2D_float _CameraDepthNormalsTexture;
    UNITY_DECLARE_SCREENSPACE_TEXTURE(_CameraDepthNormalsTexture);

    //half4 nn = tex2D(_CameraDepthNormalsTexture, UnityStereoTransformScreenSpaceTex(uv));
    half4 nn = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthNormalsTexture, UnityStereoTransformScreenSpaceTex(uv));

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.