Search Issue Tracker
Duplicate
Votes
0
Found in [Package]
6.9.1, 7.1.1
Issue ID
1186296
Regression
No
Reading shadow attenuation from Shadows.hlsl does not work in a Custom Sub Graph function
How to reproduce:
1. Download the tester-attached package(Shadow Attenuation.unitypackage)
2. Create a new Universal Render Pipeline project
3. Import the package and set the included Render Pipeline Asset
4. Open the "Shadow Issues/2. Shadow Attenuation/Shadow Attenuation" Scene
5. Enable and observe the GetMainLight, GetMainLight(ShadowCoord) and MainLightRealtimeShadow GameObjects
Expected result: the GameObjects project shadows
Actual result: the GameObjects do not project shadows
Reproducible with: 2019.2.7f2, 2019.3.0b4, 2020.1.0a5
Could not test with: 2017.4.32f1(ShaderGraph unavailable), 2018.4.10f1(Shader incompatibility issues)
Reproducible with package versions: 6.9.1, 7.1.1
Could not test with package versions: 6.9.0(Shader Incompatibility issues)
-
Resolution Note:
Using the built-in functions for lighting in Universal requires certain defines to be enabled and properties to be generated that Shader Graph does not currently support.
The suggested workaround is to copy the specific lines needed into your custom function. See MainLightRealtimeShadow function inside of "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
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
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
- Crash on MonoBehaviour::CallMethodIfAvailable when performing various actions
This is a duplicate of issue #1175274