Rendering pixels to a Render Target 2D VERY slow and/or does not work


I have included a blueprint graph that renders to every pixel in a render target 2D. It works if the render target is 256x256 (if a little slow) but totally fails at 512x512.

I understand that the DrawTexture node is not ideal for setting each pixels color but Unreal does not seem to have a DrawPixel function.

I have tried this same technique in C++ also but it just does the same.

The problem is, Unreal seems to let the DrawTexture function queue up a load of drawitems and then when you run EndDrawCanvasToRenderTarget it succeeds at 256 resolution but fails at 512.

When it fails, the editor just hangs and never recovers.

Any ideas would be appreciated.

I tried this blueprint in UE 4.23 and 4.24 but both are the same.