Kind Sirs,
I’m using a Texture Render Target 2D as an in-game zoom scope/monitor, as a control within a vehicle cockpit. I use a USceneCaptureComponent2D to render the scene onto this texture in real time, while it is used in a material on a simple plane mesh, which is always visible to the player.
Here is the code being used to set up the target:
//Camera used for the center console to display the weapon reticle
ZoomCam = CreateDefaultSubobject(TEXT("Zoom Camera"));
ZoomCam->FOVAngle = 50.f;
ZoomCam->CaptureSource = ESceneCaptureSource::SCS_FinalColorLDR;
UObject *testobj = LoadObject(nullptr, TEXT("TextureRenderTarget2D'/Game/Materials/Displays/Monitor.Monitor'"));
ZoomCam->TextureTarget = CastChecked(testobj, ECastCheckedType::NullAllowed); //line referenced below
This setup does not cause any FPS penalty on neither normal monitors, nor the Rift CR1. The Rift CR1 keeps running at 90 fps whether or not the last line is commented out.
However, using HTC Vive, the frame rate drops to about 45 fps (half) when the last line is uncommented.
There is no other code doing anything with the USceneCaptureComponent2D. No change to the UTextureRenderTarget2D, the Blueprint texture, or the corresponding material affect anything, i.e. even if the scene is rendered to a dummy texture target which is not used anywhere at all, the observed frame reduction persists on the Vive.
How can I restore the HTC Vive performance back to 90 FPS? P.S. Could this be some bug in SteamVR, and, if so, should I try to file a bug report with them?