Search Issue Tracker
By Design
Votes
1
Found in
2022.3.33f1
6000.0.5f1
Issue ID
UUM-73740
Regression
No
Shadow matte shader is not rendering when using opaque alpha clip
How to reproduce:
Open the attached project "ShadowReceiver - HDRP.zip"
Expected results: Shadows are cast on the "ShadowReceiver" GameObject in the Scene view
Actual results: Shadows are not cast on the "ShadowReceiver" GameObject in the Scene view
Reproducible with: 2022.3.33f1, 6000.0.5f1
Could not test with: 2021.3.39f1 (compilation errors)
Reproducible on: Windows 10 22H2
Not reproducible on: No other environment tested
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
- Invalid Clip Method
- WebGPU error with Fantasy Kingdom and GPU Resident Drawer
- WebGPU fails with height fog in Fantasy Kingdom
- Crash on UndoManager::RegisterUndoInternal when applying added GameObjects to a Prefab
- [Asset Bundles] A new bundle hash is not generated when the name of a serialized field is changed
Resolution Note:
We tested repro project but alpha and alpha clipping works well.
I understood this ticket as
1) Opaque + alpha clip (enabled) + shadow threshold (enabled) : Problem, shadows are not rendered.
2) Transparent + alpha clip (enabled) + shadow threshold (enabled) : Working
3) Unlit Transparent + Shadow Matte (enabled) : Working
I tested 'ShadowReceiver - HDRP.zip' project with 6000.0.5f1.
Before the test I simply modified Base Color of 'ShadowReceiver shader' (Previously it was same with shadow color so it was hard to distinguish)
(image on comment[0][0], [0][1])
1) Opaque + alpha clip (enabled) + shadow threshold (enabled)
When 'alpha' is smaller than 'alpha clipping threshold', Shadow is not appearing as the ticket said,
but When 'alpha' is higher than 'alpha clipping threshold', Shadow appears.
(image on comment[1][0], [1][1])
2) Transparent + alpha clip (enabled) + shadow threshold (enabled)
When 'alpha' is smaller than 'alpha clipping threshold', Shadow is not appearing as same as 'Opaque' case
but When 'alpha' is higher than 'alpha clipping threshold', Shadow appears.
(image on comment[2][0], [2][1])
3) Unlit Transparent + Shadow Matte (enabled)
I made a new Material(Transparent) and its Shader(Unlit). I assigned it to 'Shadow Reciever Game Object'.
As same as above cases,
When 'alpha' is smaller than 'alpha clipping threshold', Shadow is not appearing,
but When 'alpha' is higher than 'alpha clipping threshold', Shadow appears.
(image on comment[3][0], [3][1])
So, I suspects that this is not a bug but a function of alpha clipping (if a fragment is clipped, it will be discarded so there should be no shadow)
If the problem keeps occuring or is there any point that I'm missing, Please feel free to contact us.