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
- Addressables Report window UI is broken when opening via Build > New Build > Default Build Script
 - Addressables Profiles window UI break when creating a new Variable with a long name
 - No character limit when renaming Profile in Addressables Profile window, allowing excessively long names
 - Blurry, low quality Active Profile icon used in Addressables Profiles window
 - Tree Asset Preview window is not updated after assigning a new Material
 
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