Search Issue Tracker
By Design
Votes
0
Found in [Package]
7.5.2
Issue ID
1285618
Regression
No
[XR SDK] [URP] Temporary render texture does not bind to shader when set as global texture when using Single Pass Instanced
Reproduction steps:
1. Open the attached project ("Single Pass Instanced Temporary RT binding.zip")
2. Open SampleScene scene
3. Make sure Oculus rendering mode is set to Single Pass Instanced
4. Open Frame Debug window
5. Enter Play mode
6. In Frame Debug window select ToGreen
7. In Frame Debug window right panel select ShaderProperties
Expected result: _CopySource texture is _CopySource
Actual result: _CopySource texture is UnityDefault2D
Reproducible with: URP 7.5.2, .8.2.0, 10.2.1 (2019.4.16f1, 2020.1.16f1, 2020.2.0b17, 2021.1.0a9)
Not reproducible with: 2018.4.30f1 (XR SDK not available)
Tested:
- Oculus Rift
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shader warning in 'Hidden/Core/DebugOccluder' thrown after building High Definition 3D Sample Template
- Audio Mixer “+” buttons overlap with UI when the Audio Mixer window layout is set to Horizontal
- "Clear" button in the "Set project display name" closes all the pop-up instead of clearing just a name from the field
- Video Player renders no video on specific devices when using Vulkan
- The Editor slows itself down by showing tons of warnings when the majority of TransformAccessArrays content are NullRefs
Resolution Note:
The reason for the binding issue is that the project was using shader graph and declared CopySource as Sample Texture2D. In XR single pass instanced, the screen space textures are Texture2DArray type with array size 2. This type mismatch causes the binding to fail and unity binds UnityDefault2D as the default texture.
Usually when writing XR shaders in unity, user should use XR macros Texture2D_X for screen space textures, the macro will handle the texture type based on the selected stereo mode(SPI, multiview or multipass). ShaderGraph however does not support this XR macro yet.