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
- Memory leak when a lot of UI elements are spawned and despawned
- Warnings are not logged in the Console window when using external code analyzers
- Errors “TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 288“ appear constantly when Prefab is open
- Crash on PPtr<Shader>::operator or NullException errors spammed in console when calling Dispose() on null GraphicsBuffer with baked Reflection Probes
- “EndRenderPass: Not inside a Renderpass” and other Render Graph errors in the Player when Render Graph is enabled and Overlay UI is used
Resolution Note (fix version 12.0.0):
Fixed in 2021.2.0a14