I want to access the pixel data of every frame, and now I have gotten the color buffer (via Viewport->ReadPixels).
But it seems difficult to read the depth buffer. I googled the solution, and some one said that I have to edit the UE4 source code.
Here is what I want to do:
- Read the Z-buffer which includes the distance from the player’s camera to every single pixel.
- Locate the source code that implemented the Z-buffer algorithm, so that I can know what Actor a pixel is rendering (e.g. a pawn, or a static mesh chest).
Is there any way to do this?
Thanks.