   Depth test
  Hi,I read in a few articles about Greater-Than depth test (as opposed to the regular less/less-equal test).Can someone please explain in what is the purpose of such test? I know it is used in deferred shading to find the area a light covers, but couldn't understand completely how it works.Are there other usages to greater_than test?Thanks.   
  many years ago it was used so you didnt need glClear( DEPTH_BUFFER );I forget exactly howI wouldnt do it now though, its fasts + with early depth out it likes that u clear it every frame   ;  The depth buffer, like the stencil buffer, is a tool to perform whatever kind of graphical operation you want. You can even use depth-test magic combined with a stencil mask to do funky screen-space CSG. zedz mentions one trick it can be used for.   ;Quote:Original post by satanirI read in a few articles about Greater-Than depth test (as opposed to the regular less/less-equal test).Can someone please explain in what is the purpose of such test? I know it is used in deferred shading to find the area a light covers, but couldn't understand completely how it works.In deferred shading, we render the scene geometry into the depth buffer to start with. After that, we render geometry representing the area of effect of each light over the top, and shade based on that.A greater-than test for the depth buffer culls all pixels for the light geometry which would be *behind* the geometry we rendered earlier.   