[osg-users] Vertex Shader and Culling

Kim C Bale K.Bale at hull.ac.uk
Mon May 26 12:56:16 PDT 2008


Hi all,
 
 
I'm having trouble with a vertex shader I've written. I've created some geometry at 0,0,0 then use a vertex shader to translate and scale that into position within the scene. As I move the camera, the geode seems to disappear out of view as if it were being culled. 
 
I presume this is because I am modifying the position of these vertices in the shader. OSG cannot recompute it's bounding box and therefore culls it based on it's original position and size.
 
So, i have tried to remove the geode from the culling tests using the "->setCullingActive()" function however it doesn't seem to have any effect. I have also tried to completely disable culling via the command "viewer.getCamera()->setCullingMode()".with no success.
 
Is there something I have missed here? A quick trawl of the forum doesn't seem to answer it. 
 
Any help is gratefully recieved,
 
 
Kim.
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4166 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080526/daa1d13d/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080526/daa1d13d/attachment.txt>


More information about the osg-users mailing list