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
- "Draw Additional Lights Shadowmap" calls increase when custom MaterialBlockProperty is used
- Crash on _platform_memmove when importing the "Dragon Crashers - URP 2D Sample Project" to a new 2D project
- "Shader is not supported on this GPU" warnings and and shaders are not loading when building the project for non-Chromium browsers
- [iOS][URP] The screen flickers and the "Execution of the command buffer was aborted due to an error during execution" error is thrown continuously
- Shortcut Manager shows empty conflict filter when resolving runtime conflicts involving different contexts
This is a duplicate of issue #1175274