PDA

View Full Version : FBO with depth buffer



brtnrdr
07-12-2006, 09:26 AM
Hi,

I have an FBO and a depth buffer and I have disabled depth writes via glDepthMask(...) so that fragments that I've generated won't write depth values. Can I write depth values using gl_FragDepth in a fragment shader, or does glDepthMask(GL_FALSE) make the depth buffer read only?

Thanks.

Relic
07-12-2006, 09:39 AM
The latter, no writes make it through if writes are disabled.
Not writing gl_FragDepth explicitly doesn't mean you have no depth values.