Reported by a licensee. FDepthPassMeshProcessor::CollectPSOInitializersInternal sets RenderTargetsInfo.NumSamples to 1 (DepthRendering.cpp, CollectPSOInitializersInternal) regardless of the project's MSAA setting.
At runtime the depth prepass renders into SceneTextures.Depth.Target, which is created with FSceneTexturesConfig::NumSamples (SceneTextures.cpp). NumSamples is part of the precache PSO hash and match (FDynamicRHI::RHIComputePrecachePSOHash and RHIMatchPrecachePSOInitializers in DynamicRHI.cpp, and the D3D12 and Metal overrides), so with r.MSAACount above 1 every depth prepass PSO collected with 1 sample misses and compiles on first use.
The FSceneTexturesConfig passed to the collectors already holds the correct value: FSceneTexturesConfig::Init sets NumSamples from GetDefaultMSAACount (SceneTexturesConfig.cpp). Deferred decals and single layer water already use it when collecting PSOs.
Proposed fix: set RenderTargetsInfo.NumSamples = SceneTexturesConfig.NumSamples in FDepthPassMeshProcessor::CollectPSOInitializersInternal. Other mesh pass collectors (base pass, velocity, mobile base pass) hardcode 1 the same way and can be followed up separately.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-413325 in the post.
| 0 |
| Component | UE - Rendering - RHI |
|---|---|
| Affects Versions | 5.6, 5.7, 5.8 |
| Target Fix | 5.9 |
| Fix Commit | 60499603 |
|---|
| Created | Nov 11, 2026 |
|---|---|
| Resolved | Nov 19, 2026 |
| Updated | Dec 4, 2026 |