Render to Scene Depth Buffer Only

Hi ,wilberolive
I am glad to tell you I have fix this problem by just modify one place, yes, it is a bug not fixed until UE4.24.
You need to get souce code first, than modify:\Engine\Source\Runtime\Engine\Private\StaticMeshRender.cpp
FStaticMeshSceneProxy::GetViewRelevance

Result.bRenderInMainPass = ShouldRenderInMainPass();

  • → Result.bRenderInDepthPass = ShouldRenderInDepthPass(); (this is reason not render t o scene depth )

ok, build ue4 project , done.

2 Likes