UE5.7 - Fix: Lumen not working for SM5 DX11 and DX12

When using the cvar r.Lumen.Supported.SM5=1 which was working fine in 5.6 … UE5.7 presents with the following in DX11 and DX12 SM5

https://github.com/uno1982/UnrealEngine/tree/5.7-Lumen-D3D-SM5-Fix

Fix: Restore Lumen support for D3D Shader Model 5 (DX11/DX12 SM5)

Unreal Engine 5.7 broke Lumen on D3D SM5 due to StochasticLighting shader
requiring 8 UAVs (hardware limit: 4 UAVs). This commit restores full Lumen
functionality with a fallback path that combines UE 5.6’s simpler approach
with 5.7’s compatibility requirements.

Key Changes:

  • StochasticLighting.cpp: D3D SM5 detection, simplified 2-UAV depth/normal copy

  • Created LumenTileBitmask with all tiles marked (0xFF) for 5.7 compatibility

  • LumenScreenProbeGather.cpp: Fixed GI temporal validation (check data not pointer)

  • LumenReflectionDenoiserTemporal.usf: Conditional depth read for D3D SM5

  • New shader: StochasticLightingDenoising.usf (5.6-style history storage)

Result:
:white_check_mark: Full Lumen GI + Reflections working on DX11 and DX12 SM5
:white_check_mark: DX11 SM5 with Lumen SWRT is fastest performing Lumen path
:white_check_mark: Quality identical to SM6+, no tile culling optimization
:white_check_mark: Production ready, tested across multiple scenarios

Files Modified:

  • StochasticLighting.cpp (fallback path + LumenTileBitmask creation)

  • LumenScreenProbeGather.cpp (temporal validation fix)

  • LumenReflections.cpp (D3D SM5 comment)

  • LumenReflectionDenoiserTemporal.usf (depth consistency)

  • LumenScreenProbeGatherTemporal.usf (PackedPixelData validation)

  • StochasticLightingDenoising.usf (new 5.6-style shader)

  • DeferredShadingRenderer.h (function declaration)

  • LUMEN_D3D_SM5_FIX_SUMMARY.md (comprehensive documentation)

1 Like