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
- Unused Particle System Renderer Mesh settings cause performance degradation when calling SetActive
- Project Browser shows the Asset folder empty when Select Dependencies is clicked without any asset selected
- Export as JSON and CSV options missing from the Quick Search save feature
- Crash on IMGUI::GUIWindow::OnGUI when rendering scene view window in play mode in a specific project
- "FileNotFoundException" & "IOException" thrown when adding "User" Index after deleting "Assets" Index in Search Index Manager window
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