I am using an Unreal material not so much as a material but essentially as a compute shader for performance reasons (using the Custom nodes in a material blueprint), where I perform a bunch of per-pixel calculations, and then output the results as a 3D array. So it shows up as an image, but I am really only interested in the raw, precise values of the matrix.
Unaware of better ways, I tried to render this onto a surface (draw material to render target) and, for instance, save it to disk, I have issues with the format of the render target (RGBA8/16f), changes in pixel values because of getting clamped between 0 and 1 etc. Here is an image of my material that also shows the HLSL code in the custom node.
What is the right way to get direct access to the result of a material, or the result of the compute shader within, using something like memcpy?