Editor Primitives occluded by ground in BP editor viewport with Substrate Adaptive GBuffer

Editor primitives get occluded by the ground XY plane in the BP editor when they shouldn’t be. This only happens when Substrate and Adaptive GBuffer are enabled in the project.

A workaround is to change the depth-stencil state to disable the depth test, in `PostProcessCompositeEditorPrimitives.cpp`:

```cpp

DrawRenderState.SetDepthStencilState(TStaticDepthStencilState<

true, CF_Always, // instead of CF_DepthNearOrEqual,

true, CF_Always, SO_Keep, SO_Keep, SO_Replace,

false, CF_Always, SO_Keep, SO_Keep, SO_Keep,

0xFF, GET_STENCIL_BIT_MASK(RECEIVE_DECAL, 1) | STENCIL_LIGHTING_CHANNELS_MASK(0x7)>::GetRHI());

```

but that makes them visible also when there’s geometry that should occlude it.

[Attachment Removed]

Steps to Reproduce
Get UE 5.7 or UE 5.8 (I’ve tried 5.7.2, 5.7.3, 5.7.4, and latest UE 5.8 from CL52017230 20/3/2026 from Epic’s P4). Then, in a new project:

  1. In Project Settings, enable Substrate materials, and select Adaptive GBuffer for the Substrate GBuffer format (with Blendable GBuffer there are no issues)
  2. Create a new Blueprint -> Actor
  3. In the BP, add a Capsule Collider component
  4. Click on the Viewport tab, in the BP editor window.

The capsule appears occluded by an invisible XY ground plane (it shouldn’t; these primitives get occluded by geometry but that ground it’s supposedly just lines… Other geometry doesn’t get occluded)

[Attachment Removed]

Hello,

Thank you for reaching out.

I’ve been assigned this issue, and we will be looking into this editor occlusion issue for you.

[Attachment Removed]

Hello,

Thank you for reporting this. I can confirm this issue can be reproduced as described in the latest CL, and will be opening a bug report.

We will reply with a public tracker when one is available.

[Attachment Removed]

Hello,

We have opened a bug report:

https://issues.unrealengine.com/issue/UE\-371363

The tracker will be visible after it is approved internally at Epic Games and is publicly accessible.

If you have any further questions, please let us know.

[Attachment Removed]