Hi,
Thank you for the repro project; it made this quick to track down. We reproduced the black flickering on 5.8.3 with your project, both in the Blueprint editor viewport and in PIE.
Cause
Your DefaultEngine.ini enables Use Stencil for LOD Dither Fading (`r.StencilForLODDither=True`, under `[/Script/Engine.RendererSettings]`). The engine default is off.
In 5.8, instanced static meshes (ISM/HISM) were moved onto the same vertex factory as regular static meshes. With the stencil LOD dither option enabled, the depth prepass now draws HISM instances whose Opaque material uses *Dithered LOD Transition* without their per-instance LOD dither and visibility. The base pass does apply them, so some pixels end up with depth but no material data and render black. As the camera moves, the instances cross their LOD transition distances, which is why the flicker follows camera movement. This combination worked in 5.6, which is why it showed up during your upgrade.
We have logged this as a bug: UE-407428. The public page will be available at https://issues.unrealengine.com/issue/UE\-407428 once it has been reviewed for publication.
Workaround (recommended)
Disable the setting, then restart the editor:
- Project Settings > Engine > Rendering > Optimizations > untick Use Stencil for LOD Dither Fading, or
- in `Config/DefaultEngine.ini`, set `r.StencilForLODDither=False`.
This setting changes shader keys, so expect a one-time shader recompile. We confirmed with your project that the flicker is gone with this change.
Performance impact: with stencil dither off, Opaque materials that use Dithered LOD Transition do their dither with a pixel-shader clip in the depth prepass instead of a stencil test. That makes the depth prepass slightly more expensive for those meshes. Masked materials (for example most foliage) already work this way and are unaffected. In most scenes we expect a small cost, but we recommend checking `stat gpu` / Unreal Insights on your heaviest scenes. This is the default 5.8 configuration.
Alternative (if you need to keep stencil LOD dither)
Add the following to `Config/DefaultEngine.ini`, then restart:
```
[ConsoleVariables]
r.InstancedStaticMeshes.UseInstancedStaticMeshVertexFactory=1
```
This restores the separate instanced static mesh vertex factory that 5.6/5.7 used, and also fixed the flicker in your project. The trade-off is a noticeably larger number of shader permutations (longer shader compiles and cooks, more shader memory and PSOs). It is a compatibility setting, so we recommend the first workaround as the long-term solution.
Other notes:
- `foliage.DitheredLOD 0` (or disabling Dithered LOD Transition on the affected materials) also hides the problem, but HISM LODs then pop instead of fading.
- `r.EarlyZPassOnlyMaterialMasking=True` does not fix it.
- While reviewing your ini we also noticed that `r.EarlyZPassMovable`, `r.BasePassForceOutputsVelocity` and `r.OcclusionCullParallelPrimFetch` no longer exist in 5.8, and `r.BasePassOutputsVelocity` is deprecated in favour of `r.VelocityOutputPass`. Those lines have no effect and can be removed.
Please let us know whether the workaround resolves the issue in your full project.
Best regards,
Martin
[Attachment Removed]