How to convert from SetRenderTargets API

you can refer to Engine\Plugins\Compositing\LensDistortion\LensDistortionRendering.cpp

Soucre:
FRHIRenderPassInfo RPInfo(OutTextureRenderTargetResource->GetRenderTargetTexture(),
ERenderTargetActions::DontLoad_Store, OutTextureRenderTargetResource->TextureRHI);
RHICmdList.BeginRenderPass(RPInfo, TEXT(“DrawUVDisplacement”));
{


// Draw grid.
uint32 PrimitiveCount = kGridSubdivisionX * kGridSubdivisionY * 2;
RHICmdList.DrawPrimitive(0, PrimitiveCount, 1);
}
RHICmdList.EndRenderPass();