godotengine / godotengine/godot
Object with "Distance Fade" enabled does not cast shadows.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- 4.3
### System information
Win 10
### Issue description
The wall has Distance Fade enabled. It stops to casting shadows.

https://github.com/godotengine/godot/issues/69329#issuecomment-1330895397
>To resolve this, use the Pixel Dither or Object Dither transparency mode for Distance Fade.
Pixel Dither does not resolve this.
Also if this is intended then the tooltip should say that the object will stop casting shadows.

But object still do cast shadows from direct light:

Which makes me think that light camera is affected by same shader and are just to close to object. Which means light camera pass should use different settings/different shader.
Changing distance to very small number solves the shadows but looses its usability meaning ofc:

Another detail:
This is GridMap. Which means that material was assigned to mesh material slot and not to OverrideMaterial Slot of MeshInstance (because GridMap has no Override Material slot, but it should!)

### Steps to reproduce
Enable Distance Fade on material and put light close to object.
### Minimal reproduction project (MRP)
N/A
Contributor guide
Assessment
This issue has not been assessed yet.