Re: [osg-users] reflection / refraction clip plane

2013-09-18 Thread Daniel Schmid
Hi all I was unsuccesful with the ClipPlanes, so I decided to write a Vertex/Fragment Shader pair that handles the clipping by doing a fragment abort upon testing the vertex world height with a clipping height uniform. Like this I was finally able get the control I wanted. Thank you! Cheers,

Re: [osg-users] reflection / refraction clip plane

2013-09-18 Thread Marcel Pursche
Hello Daniel, what kind of graphics card are you using? ATI/AMD? And are you using a vertex shader for your terrain? I had a similiar problem with reflections in osgOcean. The solution was to add the line "gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex;" to my vertex shader. On nVidia cards this

Re: [osg-users] reflection / refraction clip plane

2013-09-18 Thread Robert Osfield
Hi Daniel, I'm afraid I don't have any ideas to what might be amiss. In terms of clip plans/position state and how many clip planes you can have active at any one time, I can provide some clarity. For each osg::Camera that isn't set up as a nested render the OSG's rendering backend sets up a Ren

Re: [osg-users] reflection / refraction clip plane

2013-09-17 Thread Daniel Schmid
Hi all Here comes my follow up. As you can see in the code snipped above, the clipping plane of the refraction camera is looking in the opposite direction. Since the clipping is done on the graphics card, and the primitives are still in world coordinates, the refraction clipping plane has to b