Hi, On Thursday, December 27, 2012 11:43:00 Paul Martz wrote: > Ah ha. And each Camera has it's own StateSet. I see. > > My situation is a bit different, as I have a single subordinate Camera > buried in the scene graph, and it is on that Node that I want to set a > projection matrix Uniform that has a different value per render thread. I > could, in theory, add the Uniform much higher in the scene graph, at the > top level slave Cameras used to create each view. But, unfortunately, this > project is a middleware utility for use by OSG-based apps, so keeping my > state and geometry local to a single subgraph in desirable... > > But thanks for the ideas and inspiration. Hopefully I can make this work > yet. -Paul
Hmm, I had something similar for a deferred renderer. I used the clamp projection callback as Glenn did, then I noticed the same lag in the uniform carrying the projection matrix that was grabed by the clamp. What helped was to explicitly state that this uniform and the state set this uniform lives in is dynamic by calling setDataVariance(osg::Object::DYNAMIC) on both objects. Now the only remaining issue here is that resizing requires to throw away a whole lot of objects to make sure the new matrices are attached and that the render order given in the pre render cameras is respected past the resize... So, yes I also whish that the render backend could be influenced more directly ... Greetings Mathias _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org