The correct solution for this is to simply set r.SceneRenderTargetResizeMethod to 2 instead of the default of 0 when there are intermediate render targets used for scene captures.
Using SceneCapture in packaged VR projects causes poor performance.
Also observed with SceneCaptureCube
Does not occur in 4.18
1. Create a new project in 4.19
2. Create a RenderTarget2D in the Content Browser. Set it to 256x256 size. Any size will work as long as it's different to native HMD resolution. Eg, anything other than 2720x1600 for Oculus.
3. Make new Starter map, place a SceneCapture2D in it, and assign the RenderTarget to its TextureTarget property. Ensure CaptureEveryFrame and CaptureOnMovement are both ticked. (Or alternatively, manually call CaptureScene() every Tick).
4. Launch a "VR Preview" PIE session. Note the framerate should be smooth.
5. Make a packaged build in the Development configuration, launch it. The framerate should drop due to RenderTarget allocation every frame. In Shipping configuration, framerate is still lower than PIE.
Close the packaged build, and check its generated log file. There should be lines resembling the following, output every frame.
There's no existing public thread on this issue, so head over toAnswerHub just mention UE-59090 in the post.