[osg-users] Vertex Shader and Culling

Kim C Bale K.Bale at hull.ac.uk
Tue May 27 03:16:30 PDT 2008


Thanks for all your replies, I went with setIntialBound() and it worked
a treat.

Regards,

Kim.

-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: 27 May 2008 08:55
To: OpenSceneGraph Users
Subject: Re: [osg-users] Vertex Shader and Culling

Hi Kim,

You can use Drawable::setInitialBound(BoundingBox) so that it
encompasses the transformed positions of the vertices.

Robert.

On Mon, May 26, 2008 at 8:56 PM, Kim C Bale <K.Bale at hull.ac.uk> wrote:
> 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.
>
>
>
************************************************************************
*****************
> To view the terms under which this email is distributed, please go to
http://www.hull.ac.uk/legal/email_disclaimer.html
>
************************************************************************
*****************
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
>
>
_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080527/661dcba7/attachment.txt>


More information about the osg-users mailing list