View Full Version : Can depth peeling be implemented without any shader?

06-10-2013, 04:39 AM
I don't know shaders, but I have a basic idea of their concept.

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, 07:25 AM
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.