I would basically like to screen capture a GPU result into a bitmap file using .NET. I would probably use XNA and my workflow would be something like:
- Call an effect with custom input data
- Have the effect run a per-pixel process
- Get the result from the effect (???)
- Save result as bitmap
Thanks…
Edit
Summary from Liortal’s answer:
To use a render target, create a
RenderTarget2D object with the width,
height, and other options you prefer.
Then call
GraphicsDevice.SetRenderTarget to make
your render target the current render
target. From this point on, any Draw
calls you make will draw into your
render target. When you are finished
with the render target, call
GraphicsDevice.SetRenderTarget to a
new render target (or null for the
back buffer). Then at any time you can
call RenderTarget2D.GetTexture to get
the contents of the render target for
further processing.
Read more about Render Targets and how to use them here: http://msdn.microsoft.com/en-us/library/bb976073.aspx
Note that the link refers up to XNA 3.1, here’s a post by the awesome Shawn Hargreaves about changes made in this area in XNA 4: http://blogs.msdn.com/b/shawnhar/archive/2010/03/26/rendertarget-changes-in-xna-game-studio-4-0.aspx