Hi there,
First of all thanks for your reply. I need to use depth in my pixel shader too therefore I’ll have a look at your shader for sure. Is is the mesh shader? right?
If you are interested in using depth test, I’ve managed to use it yesterday. After I wrote you to ask you about it I’ve found the solution.
The Depth stencil in the PSO must be initialized like so:
GraphicsPSOInit.DepthStencilState = TStaticDepthStencilState<>::GetRHI();
and when you want to render you must do:
RHICmdList.BeginRenderPass(FRHIRenderPassInfo(ScreenColorRenderTargetTexture,
ERenderTargetActions::Load_DontStore, SceneDepthRenderTargetTexture, EDepthStencilTargetActions::DontLoad_DontStore), TEXT(“YourPassName”));
RHICmdList.SetViewport(ViewRect.Min.X, ViewRect.Min.Y, 0.0f, ViewRect.Max.X, ViewRect.Max.Y, 1.0f);
// Put your draw call here
RHICmdList.EndRenderPass();
Hope this can help you
Let me know your thoughts on this matter
thanks