-
-
Notifications
You must be signed in to change notification settings - Fork 23.5k
Open
Description
Tested versions
- Reproducible in 4.4-dev7 and later
- Not reproducible in 4.4-dev6 and earlier as those don't have shadowmasks
System information
Godot v4.4.stable - Arch Linux #1 ZEN SMP PREEMPT_DYNAMIC Thu, 27 Feb 2025 18:09:27 +0000 on Wayland - X11 display driver, Multi-window, 1 monitor - Vulkan (Forward+) - dedicated AMD Radeon RX 570 Series (RADV POLARIS10) - AMD Ryzen 5 2600 Six-Core Processor (12 threads)
Issue description
Currently, turning off the shadow_enabled property turns off the shadowmask as well. This goes against the property's documentation, which says that it only affects real-time shadows.
Turning off real-time shadows while keeping shadowmasks on is useful for optimization purposes. Currently, the two ways to achieve a similar effect would be:
- Setting the shadow resolution to lowest and the max distance to 0.1 (0.0 sets it to the camera's far plane). This doesn't give as much performance benefits as it can, since the real-time shadow texture still needs to be drawn
- Setting the light baking mode to static. This approach (in its current implementation) disables specular lighting, which can affect the scene's look quite a lot (example from my game No Downforce):
Static light baking:
Dynamic light baking with shadowmasks and real-time shadows "disabled" with the first method:

Steps to reproduce
- Open MRP
- Disable shadows on DirectionalLight3D
- The shadowmask will be gone as well

