Hi Ulrich,
Ulrich Hertlein wrote: > Hi Maxime, > I'm extremely irritated by what you write and maybe I'm not the only one. > I am very sorry, please apologize. Maybe could you tell me why so that I won't do it again. Ulrich Hertlein wrote: > > Why do you suspect that the Z-buffer is influenced by alpha blending? > Because problems only appear with models having alpha blending. Ulrich Hertlein wrote: > > So you're reading back the depth buffer and it's not what you expect? Could > you post a > screenshot? > > /ulrich > You're right, it would be clearer. Here is the camera view (with a green mask): [Image: http://img7.hostingpics.net/pics/144972Z_buffer_colorimage.png ] (http://www.hostingpics.net/viewer.php?id=144972Z_buffer_colorimage.png) here the distance of fragments to the camera computed in shader: [Image: http://img7.hostingpics.net/pics/850811Z_buffer_shader.png ] (http://www.hostingpics.net/viewer.php?id=850811Z_buffer_shader.png) and the Z-buffer image: [Image: http://img7.hostingpics.net/pics/690702Z_buffer_pourri.png ] (http://www.hostingpics.net/viewer.php?id=690702Z_buffer_pourri.png) Problems are only located on surfaces having transparency. And to be complete: - The Z image is computed from another viewer than the rendering one (I allocate an image and attach it to prerendering cam's Z-buffer then execute one frame() ). - The images are sampler2D in the shader, thus I retrieve pixels from them and put it in gl_FragColor to be able to display. Thanks a lot for help, and once again I'm very sorry for being so irritating, please accept my apologies. Cheers, Max ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15942#15942 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

