GLSL check if fragment is on geometry

Posted by mokaschitta on Stack Overflow See other posts from Stack Overflow or by mokaschitta
Published on 2010-03-05T16:14:35Z Indexed on 2010/03/12 18:47 UTC
Read the original article Hit count: 681

Filed under:
|
|
|

I am currently writing the positions of my geometry to the RGB channels of gl_FragColor and I would like to write 1.0 to the alpha channel if the fragment is part of geometry, and 0.0 if its empty.

Is there a simple way to tell if a fragment is geometry or not? Maybe through gl_FragCoord.z?

thanks

© Stack Overflow or respective owner

Related posts about glsl

Related posts about depth