Hi All,
@Ricky,
it works for me as expected now.
First I attach a new viewport with e.g. half res of my output window, and
attach a texture with the same half res to the Color Buffer of the Camera. This
can be done with different Cams and resolutions, if you have some funky
pipeline.
camera -> setViewport( new osg::Viewport( 0 , 0 , halfResWidth ,
halfResHeight ) ) ;
camera -> attach( osg::Camera::COLOR_BUFFER0 , textureColor ) ; // has also
halfResWidth/Height
At the end of the pipeline I tell the unitOut not to use any camera viewport as
( size ) reference, and add another Viewport with the full resolution of my
output window.
unitOut -> setInputTextureIndexForViewportReference( -1 ) ; // Don't use
any Camera Viewport as reference
unitOut -> setViewport( new osg::Viewport( 0 , 0 , fullResWidth ,
fullResHeight ) ) ;
That's it.
@Art
With out of Sync I meant that the visual scale of the Glowed scene had not the
same size as the visual scale of the non glowed scene. My mistake was, that I
tried to scale up the viewports that were attached to the cameras ( main and
glow ), but should have done that with the viewport attached to unitOut.
Everything is working fine now :-)
But still a good Debugging Hint, didn't know that till now.
Cheers, PP
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=40215#40215
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org