eldritch
06-18-2010, 08:07 AM
Hi,
I have a large outdoor scene where i use the logarithmic depth buffer method described here:
http://outerra.blogspot.com/2009/08/logarithmic-z-buffer.html
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?
I have a large outdoor scene where i use the logarithmic depth buffer method described here:
http://outerra.blogspot.com/2009/08/logarithmic-z-buffer.html
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?