alkiem
10-22-2005, 05:16 PM
Hi,
my question is quite simple, is it possible to read in a shader the texture which is bound to the current fbo? In fact since it is not possible to access framebuffer in fragment shaders, i doubt it is possible, but could anyone confirm it, please?
For those interested, i'm trying to implement double depth pass shadow map using fbo and depth_stencil_ext: first I draw back faces with stencil keeping trace of which pixel are rendered in depth map, then I draw front faces only where the stencil have been modified. And i need to average the depth map after first pass with depth of fragments from second pass. But texture fetch to read the depth map doesn't seem to work so I guess it is not allowed.
Thanks in advance.
my question is quite simple, is it possible to read in a shader the texture which is bound to the current fbo? In fact since it is not possible to access framebuffer in fragment shaders, i doubt it is possible, but could anyone confirm it, please?
For those interested, i'm trying to implement double depth pass shadow map using fbo and depth_stencil_ext: first I draw back faces with stencil keeping trace of which pixel are rendered in depth map, then I draw front faces only where the stencil have been modified. And i need to average the depth map after first pass with depth of fragments from second pass. But texture fetch to read the depth map doesn't seem to work so I guess it is not allowed.
Thanks in advance.