Is it possible to exclude geometry from a particular shadow casting light in a deferred rendering pipeline? If yes, can it be done correctly or are there limitations? This is mainly to reduce the rendering cost of each shadow casting light.

In UE4 this is currently not possible and one of the staff members simply replied with a rather cryptic message:

"Unfortunately, this is not possible with Deferred Rendering."

Since we are rendering the depth map from the light's perspective, we should be able to exclude geometry from that render pass...? Are there edge cases that I am not thinking of when combining shadow casting lights with deferred rendering?

Link to forum post (and screenshot to follow in case the link goes down): https://forums.unrealengine.com/unreal-engine/feedback-for-epic/35667-exclude-object-from-a-specific-light

enter image description here

  • \$\begingroup\$ As a built in solution you have the light channels. In addition if changing the engine code is not a problem you can add your bells and whistles there. \$\endgroup\$ Jan 31, 2020 at 17:20
  • \$\begingroup\$ @ColdSteel The light channels are not a performance optimization (and has a slight performance hit) but rather a tool for the lighters to prevent certain lights from affecting certain objects. Unfortunately we do not have programmers dedicated to modifying the engine and the rendering pipeline, who also understand the rendering pipeline, to such a degree. \$\endgroup\$
    – Samaursa
    Feb 1, 2020 at 16:34
  • 1
    \$\begingroup\$ Then, well you don’t have any built in options. \$\endgroup\$ Feb 1, 2020 at 17:38
  • \$\begingroup\$ I understand, however the question was whether it is possible (which I will edit to clarify) and if it is, can it be done correctly in a deferred rendering pipeline. \$\endgroup\$
    – Samaursa
    Feb 2, 2020 at 19:09
  • \$\begingroup\$ With engine changes why it wouldn’t be possible ? One can define a shadow channel (like some int32 bit mask) and in the rendering loop opt out the geometry. Add it to every light and to every USCeneComponent/USceneProxy (or whatever the proxy is called) - and in the shadow pass before rendering the shadows check for that bitmask \$\endgroup\$ Feb 2, 2020 at 19:10

1 Answer 1


At a conceptual level, yes, the decision of what gets rendered into a shadow map is entirely yours. You can choose to include or exclude whatever geometry you want from the shadow map generation process, and this will mean that the generated shadow map will make it so that any visible objects not in the shadow map will not cast shadows. You can even make invisible objects cast shadows if you like.

But the answer you found was not about the idea of shadow maps; it was specifically about whether Unreal 4's implementation was capable of doing this. According to the reply you were given, the UE4 scene graph system is not capable of doing this, of having there be a difference between which objects in the scene are shadow casters and which objects are part of the visuals of the scene.

You could probably modify the engine to allow this, but the point of the response is that this is not a feature of the engine as it stood in 2015.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .