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:
Full Lumen GI + Reflections working on DX11 and DX12 SM5
DX11 SM5 with Lumen SWRT is fastest performing Lumen path
Quality identical to SM6+, no tile culling optimization
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)
