CaptureScene to Texture Rnder Target High Memory Usage

anonymous_user_32f61b97
Thu, 01 Oct 2020 06:05:21 +0000
Rendering

Hello,

I am trying to use a texture render target 2D to temporarily capture a view, so I can grab a pixel from that and store it in a buffer. The problem is, whenever I call USceneComponent2D->CaptureScene() - I assumed the texture would get overwritten and therefore not require any new memory. However, the memory usage is very high and increases by 400-1000 KB for each call to CaptureScene even though the same render target is used.

This is all occurring in a single frame - so I can not delete the texture afterwards because it can only be garbage collected as it is a descendant of UObject. I just want to be able to call delete on the texture and free the memory - can I do this?

1 post - 1 participant