[osg-users] osg_ViewMatrix, osg_ViewMatrixInverse etc. with stereo

Tobias Bellmann Tobias.Bellmann at dlr.de
Thu May 4 07:26:32 PDT 2017

I have the same problem, I rely heavily on the osg_ViewMatrixInverse in my shaders to calculate the Camera Position, but in Stereo Mode, all results are getting messed up.

also adding 

to the Views of the Windows does not change the behaviour in Stereo Mode.

Kind Regards,

hybr wrote:
> Hi,
> Seems like built in osg glsl uniforms like osg_ViewMatrix, osg_ViewMatrixInverse projection etc doesn't reflect changes to view and projection matrices with split\interlaced stereo modes( where view shifted and\or projection sheared depending on current eye ).
> Is there any convenient way to get correct view matrix (and inverted one) directly in shader or during cull\draw traversal with stereo turned on?
> Thank you!
> Cheers,
> Sergey

Read this topic online here:

More information about the osg-users mailing list