Re: [osg-users] Lagging between main camera MV and prerender camera

2015-01-12 Thread Daniel Schmid
Hi all I solved the problem! Actually the mistake I made is that the uniform holding the texture-matrix was added to the stateset of the root node. Instead I had to dive into the ShadowedScene, find the stateset of the shadow receiving scene part and add the matrix (and the prerendered texture)

Re: [osg-users] Lagging between main camera MV and prerender camera

2014-12-15 Thread Robert Osfield
Hi Daniel, If you aren't modifying the modelview matrix in cull then at least in theory using that value should be safe. If modelview matrix usage is OK, then my best alternative guess would be that your render to texture pass is not being done prior to the rendering of the main scene. You have

Re: [osg-users] Lagging between main camera MV and prerender camera

2014-12-14 Thread Daniel Schmid
Hi Robert I do all my matrix calculations in the cull, which is renderTraversal. I don't understand why the camera matrices shouldn't be correct at this time... Code: void EfxTracksPrerenderer::ViewData::cull(osgUtil::CullVisitor* a_cv) { osg::NodePath l_NodePath = a_cv->getNodePath(); os

Re: [osg-users] Lagging between main camera MV and prerender camera

2014-12-12 Thread Robert Osfield
Hi Daniel, Sounds like you are doing updating the m_TextureMatrix prior to the main Camera being updated. By default the Viewer::updateTraversal() gets the modelview matrix from the CameraManipulator after the update traversal. Some camera manipulators track nodes in the scene so have to be calle

Re: [osg-users] Lagging between main camera MV and prerender camera

2014-12-12 Thread Trajce Nikolov NICK
Hi Daniel, I faced the same problem http://forum.openscenegraph.org/viewtopic.php?t=14354 How I fixed and hints from Robert. Hope it helps Nick On Fri, Dec 12, 2014 at 4:08 PM, Daniel Schmid < daniel.sch...@swiss-simtec.ch> wrote: > > Hi all > > Trust me, I searched the forum for a hint but co