Search Issue Tracker
Fixed in 12.0.0
Votes
0
Found in [Package]
6.9.0, 7.0.1
Issue ID
1175274
Regression
Yes
Shadows not applying when using File in a Custom Function Node with Universal RP
Repro steps:
1. Open attached project
2. In the Asset folder, double click on "ToonShading" Shader Graph element to open Shader Graph window
3. Find the "Custom Function" Node, that is attached to the rest of the graph, and click on the cogwheel
4. Change the Type field to "File"
5. Double click on the "CustomLighting" file, that appears in the Source field
6. Add "#pragma multi_compile _ _MAIN_LIGHT_SHADOWS" as the first line of the method and press "Save"
7. Go back to Shader Graph window, press "Save Asset" and observe the "Sphere" object in the Scene view
Expected result: Shadows are cast on the sphere
Actual result: No shadows are cast on the sphere
Reproducible with: 2019.2.0b6, 2019.2.1f1, 2019.3.0a12
Could not test with: 2017.4.31f1 (Universal RP did not exist), 2018.4.6f1, 2019.1.14f1, 2019.2.0b5 (project gets corrupted)
Reproducible with package versions: 6.9.1, 7.0.1
Could not test with package versions: 6.7.1 (project gets corrupted)
Note: Using Type "String", with the line from step 6 added to the front, casts shadows and works as intended
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
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
- Character animation freezes when toggling animator on/off in a coroutine
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
Resolution Note (fix version 12.0.0):
Fixed in 2021.2.0a14