I have a number of orthographic camera blueprints (scene capture 2D components) above my landscape.
The player controller will find the closest one, and when which one is closest changes, send it a “capture minimap” event.
There is also a UI widget that overlays the top-left corner, which uses an image widget, which uses a material that sources the render target all these cameras capture into, making it fully opaque.
This kind of works, except randomly, the contents of the render target will swap to something full of little squares and what looks like the outline of my foliage from the top.
If I keep moving so another camera captures a scene, the rendertarget will update correctly again.
It’s almost as if, sometimes, the engine chooses to re-use my render target for something else, or the framebuffer memory used for it gets overwritten or something.
Here’s a short video showing the overlay, the change to corrupted-squares, and the setup of the blueprint capture component:
Why does the render target lose its contents? Nothing else is configured to use it, and none of the other cameras are being activated.
Do I have to do something to keep the contents of a render target across more than one frame?