PDA

View Full Version : How is gl_FragCoord calculated. ?



Vadim
01-19-2010, 06:34 AM
I need to shift the depth of a fragment a little bit (converting circles to spheres). Can anyone explain me how the original gl_FragCoord.z value is calculatged ?

Dark Photon
01-19-2010, 08:15 AM
I need to shift the depth of a fragment a little bit (converting circles to spheres). Can anyone explain me how the original gl_FragCoord.z value is calculatged ?
I'm sure there are lots of places, but here are a few:
* gl_FragCoord.z (OpenGL.org thread) (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=267320#Post2673 20)
* Comparing Depth in Fragment Shader (OpenGL.org thread) (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=268892#Post2688 92)

overlay
01-19-2010, 09:16 AM
here is another OpenGL.org thread:
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=255766#Post2557 66