Search Issue Tracker
Fixed in 2022.2.X
Votes
0
Found in
2020.3
2021.2
2022.1
Issue ID
1383155
Regression
No
"Trying to access shader snippet -1" is thrown when accessing Pass.SourceCode for a GrabPass pass type
How to reproduce:
1. Open the attached "ShaderAPI" project
2. Select the "Assets -> Internal -> New Shader Analyzer" Asset
3. Right-Click on the Asset icon in the Inspector
4. Select Compile
5. Observe the Console log
Expected result: The Shader variants compiled successfully without any errors
Actual result: The Shader variants fail to compile. "Trying to access shader snippet -1, but it was not found." error is thrown
Reproducible with: 2020.3.24f1, 2021.2.5f1, 2022.1.0b1
Couldn't test with: 2019.4.33f1 (some ShaderUtil and ShaderData.Pass definitions are not present)
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 2022.2):
Fixed in 2022.2.0a5
Accessing the source code for a GrabPass type pass should now return an empty string. In addition, IsGrabPass was added so you can query this state yourself.