What I’m trying to do is taking 24 screen captures, of a camera orbiting around an actor, as quickly as possible (trying to minimize latency).
What I’m doing right now is:
- Using a SceneCaptureComponent2D
- Using a UTextureRenderTarget2D with
InitCustomFormat(1000, 1000, PF_B8G8R8A8, false)
to avoid HDR andbGPUSharedFlag
, which doesn’t seem to help much, but doesn’t hurt I guess - Loop 24 times:
readPixels
, move and rotate the SceneCaptureComponent2D
I understand that readPixels
is a slow operation because it stalls the GPU pipeline and there’s the need to make a transfer between the GPU and the CPU memory, but this whole thing is taking ~400ms (~16ms per readPixels
). Is that to be expected or am I doing anything wrong?
My next step will be to try and parallelize the 24 captures. Does that seem like a sound approach?