Hi Erik,

Erik Podetti wrote:
> Hi everybody. I'm experiencing a strange behaviour. If I render my FBO, the
> shader (SHL_CHUNK) associated to objects in the scene seems not to be able
> to extract the gl_FragCoord.z component.
> E.G. let's suppose I'm inside the fragment shader of an object inside the
> scene view from the FBO, if I want as gl_FragData[n]  (output) the
> gl_FragCoord.z   I get a saturated value of 1.0 or something similar. The
> strange thing is tha gl_FragCoord.x and gl_FragCoord.y    are correct.
> If I "visualize"   gl_FragCoord.w  I get something like a " 1.0 -
> Zbuffer"....similar to a z-buffer but inverted (near objects are white and
> far ar black).
> But I think the "w" component is not just "1 - z".
> Can anybody please help me understanding how to extract the z value because
> I simply need to create a zbuffer to a texture
>   
Check out
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=234519
 
for some interesting info on gl_FragCoord.

Hope it helps

    Dirk



------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to