Hi

if you dont need camera view matrix in shaders (i believe you need only 
projection matrix for your task):
you can place this geode under matrix transform with reference frame set to 
ABSOLUTE_RF, and position it somewhere in front of camera with identity view 
matrix, this should solve culling issues.
or you can even add ortho projection here and pass camera projection matrix via 
uniform for calculations in shader.

Cheers.

22.04.2013, 23:34, "Anton Fuhrmann" <fuhrm...@vrvis.at>:
> Hi,
>
> I need to disable culling on a geode which implements a skydome/plane as a 
> shader.
>
> The problem is that the vertex shader places the existing vertices 
> screen-aligned at the far plane, but OSG still thinks they are in their 
> original positions.
>
> This problem as already been discussed - but not conclusively solved - in 
> other threads:
> (cannot post URLs at the moment)
> viewtopic.php?t=20300
> viewtopic.php?t=10912
>
> For this situation, disabling the culling is necessary because I do not want 
> the scene to include the "real" positions of the sky plane at "infinity". It 
> would defy near/far calculation and I would need to introduce a callback that 
> recalculates the positions outside the vertex shader just so that the skydome 
> node does not get clipped.
>
> I already tried
> Code:
> Geode->setCullingActive(false)
>
> and
> Code:
> Camera()->setCullingMode( osg::CullSettings::NO_CULLING )
>
> but both cull my node as soon as the original vertex positions are behind the 
> camera.
>
> My workaround at the moment is to set the initial bounds very large, but this 
> is unnecessarily inflates the BBox of the real scene.
>
> Any suggestions would be appreciated!
>
> ...
>
> Thank you!
>
> Cheers,
> Anton
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=53481#53481
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to