Avoid Z-fighting same way as SGIX_reference_plane?

SGIX_reference_plane looks like a simple and clever extension. Set a reference plane, then draw all the coplanar geometry you want in a single pass, no stencil buffer, with no Z-fighting. But it’s only available on SGIs.

Can the same be achieved in a shader? Looks like gl_FragCoord and pixel_center_integer could be used for this somehow, but I don’t know how.

Any ideas?
Thanks,
Rob.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.