Search Issue Tracker
Fixed in 7.1.8
Votes
0
Found in [Package]
6.7.1, 7.1.2
Issue ID
1197338
Regression
Yes
[URP] Light and shadows behind Objects are rendered on top when Shadow Cascades are enabled & using Renderer Features to render
Reproduction steps:
1. Create a new URP/LWRP template project
2. Create a GameObject along with a new Layer
3. Assign that Layer to newly created GameObject
4. In Forward Renderer remove that Layer from Default Layer Mask
5. Using Forward Renderer create a Renderer Feature specifically for that Layer
Expected result: Object will be rendered at different time, but visibly, nothing will change
Actual result: Any light or shadows behind the Object is rendered on top of it
Reproducible with: URP 6.7.1 (2019.2.0a10), URP 6.9.2 (2019.2.13f1), URP 7.1.2 (2019.3.0b11, 2020.1.0a13)
Not reproducible with LWRP 4.1.0.0 (2018.4.13f1)
Could not test with: 2019.2.0a1: 2019.2.0a9, because could not create a Forward Renderer
Notes:
1. Shadow Cascades have to be enabled (2 or 4) on Pipeline Asset in use to reproduce the issue
2. Forward Renderer is not always created and assigned in Pipeline Asset by default (depends on version)
3. LWRP versions 6.5.2 & 6.5.3 allows you to create Forward Renderer, but you are unable to create Renderer Features. Could not test if the issue reproduces on these versions
4. This seems to be package specific because when using same Unity versions the bug does not repro using LWRP 6.5.3, but repros using 6.7.1 (f.e. 2019.2.0b1)
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
- 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
- White lighting artifact when a point light with a small emission range and "Hard Shadows" touches an object while a directional light with "Soft Shadows" and another point light are present
Resolution Note (fix version 7.1.8):
The object rendered with the RenderObjectFeature is only being rendered at the Event, and it is not being injected into the Depth Prepass (it happens when you turn on shadow cascade). This is why the things behind it are being rendered on top.
RenderObjectFeature is still in experimental and will be expanding the features, including be able to inject the rendering into multiple shader passes / rendering events. So by-design for now.