Search Issue Tracker

Fixed in 7.2.X

Votes

1

Found in [Package]

d99ce917d2173295d21db7c71b74b5f070000ddf

Issue ID

1185272

Regression

Yes

[ShaderGraph][UniversalRP][XR] PBR and Unlit ShaderGraph materials do not work with VR Stereo Instancing

Package: Scriptable Render Pipeline Universal

-

Reproduction steps:
1. Open "XR_ShaderGraph.zip" project with updated SRP master
2. Enter Play mode

Expected Result: ShaderGraph Materials work on both eyes properly
Actual Result: ShaderGraph Materials are pink in one eye and missing in the other eye

Reproduced with: 2020.1.0a12, 2019.3.0b10, 2019.2.12f1, 2018.4.12f1
Did not reproduce on: 2017.4.34f1

Errors:
"Shader error in 'Shader Graphs/PBR': undeclared identifier 'unity_StereoEyeIndex' at /repo/ScriptableRenderPipeline/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl(161) (on d3d11)
Compiling Vertex program with STEREO_INSTANCING_ON _MAIN_LIGHT_SHADOWS _ADDITIONAL_LIGHTS_VERTEX
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR

Shader error in 'Shader Graphs/Unlit': invalid subscript 'stereoTargetEyeIndex' at /repo/ScriptableRenderPipeline/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/UnlitPass.hlsl(13) (on d3d11)
Compiling Vertex program with STEREO_INSTANCING_ON
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR"

  1. Resolution Note (fix version 7.2):

    Fixed with 2020.1.0a23 (7.2)

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.