I'm using an Heightfield to represent my terrain and parts of the terrain could have a surface feature (e.g. a lake). The lake is being drawn as a polygon directly on the surface of the terrain. This, of course, is causing z-fighting to occur between the terrain and the surface feature. I have been trying to solve this problem and have run across a couple solutions but they aren't working for me.
I have tried using polygon offset with the GL_OFFSET_POLYGON_FILL mode, which works when zoomed out far but up close z-fighting still occurs. I have tried using a stencil buffer approach but I can't get it to work properly. I can get the surface feature to stencil out the area of terrain but if you rotate the scene so that the surface feature is behind a mountain the stencil is still in place and the feature is rendered through the mountain. Hopefully, I am doing something wrong and someone can explain how I can make this work. James
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org