Search Issue Tracker
Fixed in 12.0.0
Votes
1
Found in [Package]
11.0.0
Issue ID
1329116
Regression
Yes
ShadowCaster2D is not displayed correctly when using a perspective camera
How to reproduce:
1. Open the attached project
2. Open SampleScene
3. Observe Game View
Expected result: The shadow is wide and straight
Actual result: The shadow is bent
Reproducible with: 11.0.0 (2021.1.4f1)
Not reproducible with: 7.5.3 (2019.4.24f1), 10.4.0 (2020.3.4f1)
Could not test with: 12.0.0 (shadow is not rendered at all)
Comments (1)
-
Dorcan
Apr 16, 2021 06:28
Workaround:
The problem resides in the LightingUtility.hlsl file, at light 68.
In order to fix it you have to:
1. Duplicate the URP package folder found in PackageCache
2. Move it to packages folder
4. Uninstall URP from the Packages Manager
5. Edit [URP Folder]/Shaders/2D/Include/LightingUtility.hlsl, and replace this line (line 68):output.shadowUV = ComputeNormalizedDeviceCoordinates(output.positionCS.xyz);
with
output.shadowUV = ComputeNormalizedDeviceCoordinates(output.positionCS.xyz / output.positionCS.w);
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
Resolution Note (fix version 12.0.0):
Fixed in: 2021.2.0b1