From: Brian P. <br...@va...> - 2001-06-05 14:38:26
|
Brian Paul wrote: > > Taura M wrote: > > > > When any polygon offsetting is enabled, the final depth written is the > > one WITH the offset applied, is there a way to have the depth tested using > > the offsetted value but written as the actual (original) value? > > Sorry, no. Actually, maybe there is a way using two passes and the stencil buffer. You might be able to enable polygon offset, disable depth writes and setup the stencil buffer to set a stencil bit when the depth test passes. Then, in a second pass, disable polygon offset, enable depth writes, use glDepthFunc(GL_ALWAYS) and setup a stencil test to pass wherever the stencil bit was set in the first pass. That's just off the cuff so I'm not 100% sure it meets your needs. -Brian |