View Full Version : Reading buffer values in fragment shader

01-14-2005, 10:24 AM
Hello all,

is it possible to read the current depth buffers and color buffers value for a given raster position in a fragment shader?

If not i guess i'll have to create a pbuffer and render the depth buffer and color buffer into that prior to using the shader and access it as a texture unit.



01-14-2005, 10:33 AM
No, this is not possible with current hardware. You'll need to copy the depth and color buffers into textures if you want to read them from the fragment shader.

01-14-2005, 10:37 AM
Right ho cheers, thought it might be the case but id check first.