PDA

View Full Version : Reading buffer values in fragment shader



MButchers
01-14-2005, 11: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.

Cheers

Mark

jra101
01-14-2005, 11: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.

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