Re: [osg-users] How to create a decal on a road segment?

2011-11-30 Thread Raymond Bosman
Hi Brad, Thanks for your answer. Currently, I place the decal on the road segment without depth testing. For flat surfaces (planes) it works fine. When the road has a bump or has an incline the depth test seems to be needed. Some lane markers are drawn where they should be hidden (depth test f

Re: [osg-users] How to create a decal on a road segment?

2011-11-28 Thread Raymond Bosman
Hi, Thanks for your answer, but unfortunately the multi-pass technique gives the same result as the stencil buffer. (I tried it, to be really sure.) Cheers Raymond. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44073#44073 Attachments: http

Re: [osg-users] How to create a decal on a road segment?

2011-11-28 Thread Raymond Bosman
To demonstrate the problem here is a screenshot. [Image: http://forum.openscenegraph.org/files/ramp_segment_587.png ] The code below shows a simplified version of the problem. When you look at the same angle as shown in the screenshot, the 'lanes' (red triangles) will appear through the 'road' (

[osg-users] How to create a decal on a road segment?

2011-11-25 Thread Raymond Bosman
Hi all, We are trying to create a road with lane lines and other markers on top. For the lane markers and the road segment we create separate geometry. When we place the geometry on top of the asphalt we got Z-fighting. To solve the Z-fighting issues, we tried to use Stencil buffers. In our s