Re: [osg-users] Transformation nodes with shaders

2011-05-17 Thread SkullCheck
Hi Robert, Thanks for the tips and I set the UseModelViewAndProjectionUniforms flag on the Viewer-Camera-GraphicsContext-State object. However when I do this then absolutely nothing shows up on screen. Basically what I've had to do is manually append the view matrix onto each light's model

Re: [osg-users] Transformation nodes with shaders

2011-05-16 Thread Robert Osfield
Hi Chris, On Sun, May 15, 2011 at 9:45 AM, SkullCheck csklu...@gmail.com wrote: I've dug into the OSG source code a bit and found the following: - special osg_* uniforms are maintained in the State class, the ones of interest are osg_ModelViewProjectionMatrix, osg_Vertex, etc This are drop

[osg-users] Transformation nodes with shaders

2011-05-15 Thread SkullCheck
Hi, I'm working on implementing some lighting effects with shaders and I've run into the problem that vertex positions are passed to the shader in local coordinates. This means that if there are any transformation nodes in the scenegraph underneath where the shader is active, the lighting