Updating deferred captures too early causing VR flickering

Hi everyone!

I am rendering using a SceneCaptureComponent2D while having a VR rendering and it causes problems. The effect is that there are a few frames of flicker in the opposite side of the camera movement in my HMD render (and after investigation it is linked to the LightInjection in FDeferredShadingSceneRenderer::ComputeLightGrid). It makes this combination of feature unusable because this effect is very nauseating.

I think what is hapenning is right now the call to render the SceneCaptureComponent::UpdateDeferredCaptures is made before rendering the scene itself (which is the HDM render) and something must not be cleaned properly in the buffers so that when doing that second render, it uses some data from the previous render.

My fix right now is to render the USceneCaptureComponent::UpdateDeferredCaptures after the scene rendering and it is working perfectly. Is there a reason why I should not do this? Should it be like that in general?

Thanks for your time,