Hi Nikolai, If you are using a GL2 build of the OSG then you can just use the built-ins like gl_ModelViewMatrix. If you are using GL3/GLCoreProfile or GLES2 then you'll tell the OSG to provide osg_ModelViewMatrix etc. in place of the gl_ModelViewMaitrx etc.
You can tell the OSG to provide the osg_ variations by setting the osg::State::setUseModelViewAndProjectionUniforms(true), but if your are building the OSG using GLES2/GLES3 or GL3/GLCoreProfile then this setting will be true by default. Have a look at the osgshaders and osgsimplegl3 examples. Robert. On 5 October 2017 at 05:19, Nikolai Christensen <[email protected]> wrote: > 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 > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

