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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
This is a duplicate of issue #1175274