Forward shading missing dynamic shadows for dynamic-only shadowed stationary lights


In UE4 4.14 there is a bug that prevents dynamic shadows from being drawn for stationary lights if the light is set to not cast static shadows. What I would have expected is that turning off static shadowing for a stationary light would still allow the light to produce dynamic shadows. This is also true if you turn off a project’s Rendering->Allow Static Lighting option.

It also appears that if you set a stationary light to not cast dynamic shadows in forward shading that the light no longer casts static shadows. Essentially you need both types of shadow casting on to get any shadows out of a stationary light while using forward shading.

To reproduce:

  1. Create a new, blank project with 4.14 and include the starter content. I also set the project to use Scalable 3D or 2D.
  2. Change the project to use Forward Shading and restart the editor
  3. Load up the Minimal_default map if it isn’t already
  4. I set the left chair to Movable while testing the difference between lightmaped and dynamic shadows
  5. Rebuild the lightmaps
  6. Play in editor
  7. Eject from the player and select the left (Movable) chair. Drag it around and notice dynamic shadows
  8. Stop PIE
  9. Select the Light Source light and uncheck its Cast Static Shadows. Make sure the light’s Cast Dynamic Shadows is still checked.
  10. Rebuild lightmaps (should no longer see static shadows from Light Source)
  11. Play in editor
  12. Notice that there are no dynamic shadows. Ejecting from player and moving the left chair produces no dynamic shadow.
  13. Exit PIE
  14. Select the Light Source light and check its Cast Static Shadows. Uncheck the light’s Cast Dynamic Shadows.
  15. Rebuild lightmaps (static shadows are missing!)
  16. Play in editor
  17. Notice that there are no static shadows now (and no dynamic shadows as expected)
  18. Exit PIE
  19. Change the Light Source light so that both Cast Static Shadows and Cast Dynamic Shadows are checked
  20. Rebuild lightmaps
  21. Play in editor
  22. Eject from Player
  23. Move left chair around. Notice that Static objects have static shadows and the Movable chair has a dynamic shadow.

As another test, uncheck the project’s Rendering->Allow Static Lighting and restart the editor. Make sure that the Light Source light still has its shadow casting turned on (could be both Static and Dynamic, or just Dynamic). Play in the editor and notice that there are no shadows at all. I would have expected dynamic shadows to be present for the stationary light while using forward shading.

Hi Gnometech,

What you’re seeing here is two different things with Stationary Lights. First being that Dynamic only Directional Lights are not yet supported for Forward Rendering. You still need to have the Static Shadow Casting enabled. This may be added in a future release, but I’m not sure it’s going to be in 4.15 as it’s currently not in my latest build. Second being that with Stationary Lights when you disable Cast Dynamic Shadows the static shadows don’t automatically show up like this. They’re fade in/out range is determined by the value used for the Stationary Dynamic Shadow Distance that is set in the Stationary Directional Light. I would expect the behavior you’re seeing here until the features for forward rendering in better parity with the deferred renderer.


Hi Tim.

Thanks for getting back to me. And thanks for letting me know about stationary lights in general when it comes to dynamic and static shadows. I wasn’t aware of that.

In the future it would be great if we had a feature matrix for forward shading so that we can better plan out how to make use of this awesome new renderer.