I have a large outdoor scene where i use the logarithmic depth buffer method described here:
This works nicely and my depth precision is extremely good. However, I need to render some runways with runway markings, and for this I have used glPolygonOffset. Now, it appears that when I write to the gl_FragDepth in the shader, the glPolygonOffset is disabled.
Is there any way to read out the offset values in the shader? Any built-in uniforms or similar?
This z-buffer method is implemented in all my material shaders, and I would rather not have to define this as a new uniform variable in all my various shaders.
Any idea how to fix this?