Hey guys, i’m trying to read the data from render targets that i use to simulate water reactiveness like this:
Now, i want to add buoyancy to this generated waves, for this i have to re-read the render target info.
The problem is that the only info i have found at the moment is this one:
With some adjustments, mainly getting the render target like this:
FRenderTarget *RenderTarget = Heightfields[CurrentHeightfieldIndex]->GameThread_GetRenderTargetResource();
I have been able to recover the render target info without any kind of crashes… but is veeeery slow, from 120 fps to 30fps (even limiting the updates to 30 fps TOP).
This line:
RHICmdList.ReadSurfaceData(
Context.SrcRenderTarget->GetRenderTargetTexture(),
Context.Rect,
*Context.OutData,
Context.Flags
);
is really slow, and i need to know if there’s a way to get the pixel data quickly… does anybody have an idea on how i can achieve something like that? or is it imposible right now?
I’m doing other things with RenderTarget like FFT/IFFT calculus, and is pretty mandatory to be able to queue data to be read from the render target at some point, even for basic buoyancy.
Cheers!