[osg-users] Transform matrix as Uniform to shaders
Sebastian Messerschmidt
sebastian.messerschmidt at gmx.de
Thu Oct 5 06:52:15 PDT 2017
Hi Nickolai,
In case you're really after the ModelMatrix you need to use the
osg_ViewMatrixInverse and multiply it with your current
osg_ModelViewMatrix.
As Robert already mentioned you need to set the
osg::State::setUseModelViewAndProjectionUniforms(true) in order to make
this work.
Cheers
Sebastian
> Hi,
>
> I need a matrix for the transform from root scene node to the node where the mesh the shaders currently are operating on is in.
>
> Does OSG pass such a matrix automatically to the shaders?
> If yes, is there other uniforms passed and is there a list of them somewhere?
>
> Sorry if my question is dumb, I am new to shaders.
>
> Thank you!
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72103#72103
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
More information about the osg-users
mailing list