PDA

View Full Version : Buffering all render data



richasea
03-11-2011, 05:19 PM
Hi,
I'm working on a project using OpenGL 3.3.
Is there a way to render a scene and keep all pixel data?
By this I mean I want to keep the Z position of the pixel and colour information in a buffer so I can use it later.
From what I understand by default OpenGL keeps the topmost colour and z coordinate, but I need the colour and z coordinate of every pixel that has been rendered in the scene, even if later in the rendering process it is occluded.

Thank You

carsten neumann
03-11-2011, 05:36 PM
It's possible but does require some work, because it essentially means the upper bound on data per pixel depends on the depth complexity of the scene (many overlapping polygons lead to more color/depth info needing to be stored).

That being said look at techniques for order independent transparency (e.g. (double) depth peeling or A-buffer) those have to solve the same problem.