cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

xernobyl
Journeyman III

OpenGL depth pre pass / early z: glDrawBuffer(GL_NONE) or glColorMask(0,0,0,0)?

To take advantage of the speed optimizations hardware has while writing to the depth buffer only (shadow maps or early z / depth pre pass), should I use glDrawBuffer(GL_NONE) or glColorMask(GL_FALSE...)?

0 Kudos
Reply
1 Reply
kenwang
Staff
Staff

Re: OpenGL depth pre pass / early z: glDrawBuffer(GL_NONE) or glColorMask(0,0,0,0)?

early Z test is independent with color buffer operation, with or without color buffer attachment/mask, you can take advantage of early Z test.

0 Kudos
Reply