<div dir="ltr"><div><div><div>Hi Nikolai,<br><br></div>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.<br><br><br>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.<br><br></div>Have a look at the osgshaders and osgsimplegl3 examples.<br><br></div>Robert.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 5 October 2017 at 05:19, Nikolai Christensen <span dir="ltr"><<a href="mailto:emptyyetfull@gmail.com" target="_blank">emptyyetfull@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
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.<br>
<br>
Does OSG pass such a matrix automatically to the shaders?<br>
If yes, is there other uniforms passed and is there a list of them somewhere?<br>
<br>
Sorry if my question is dumb, I am new to shaders.<br>
<br>
Thank you!<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=72103#72103" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=72103#<wbr>72103</a><br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</blockquote></div><br></div>