Search Issue Tracker
By Design
Votes
1
Found in
2022.2.9f1
2023.1.0b4
2023.2.0a4
Issue ID
UUM-28768
Regression
Yes
The "Invalid subscript 'positionOS'" error appears when using the URP package shader libraries
Steps to reproduce:
1. Open the attached project “ShaderError“
2. Select the “Assets/LightShaft/Shaders/LightShaft.shader“ shader
3. In the Inspector window observe the Errors list
Expected result: No errors are displayed
Actual result: The “invalid subscript ‘positionOS'“ error is displayed
Reproducible with: 2022.2.0a16, 2022.2.9f1, 2023.1.0b4, 2023.2.0a4
Not reproducible with: 2020.3.43f1, 2021.3.16f1, 2022.1.24f1, 2022.2.0a15
Reproducible on: Windows 10
Note: Recompile the Shader if the “Couldn’t open include file“ error is displayed
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
- [Editor] Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
Resolution Note:
The LightShaft.shader depended on some internal shader files from URP that changed. The shader needs to be updated to appropriately declare the the shader vertex description.
It's also recommended to check the upgrade guide here: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@16.0/manual/upgrade-guide-2023-1.html#the-universal-renderer-is-now-using-the-rthandle-system