I need to implement depth peeling and so I would like to know if first I should go deeper into the shader world or it could be implemented without shaders, just using smartly the glDepthFunc..

Thanks in advance

06-10-2013, 08:25 AM

malexander

No, you need a shader. Depth peeling requires that you do 2 depth tests, and it's only possible to do 1 depth test using the regular GL depth-test without a shader. The fragment shader needs to do the second depth test manually by looking up the second depth in a depth texture via a texel fetch or texture call.