Hi there,
I'm stuck again. I try to get a pixel (just one per frame) from a render target. How can I do that without much overhead.
What I do now is (every frame):
- Create new texture
- Copy render target surface to that texture
- Get pixel from copied textured
- Destroy texture
(Yes it works, but is slow as hell)
A normal texture can just be locked and get some data out of out, but a render target is a different story...
So is there a better way to just get one pixel? (I cannot render my scene to a 1x1 texture!!... well I can, but I don't want to end up looking at one big-ass pixel)
ps. I'm using DirectX 9 and shaders.
Bookmarks