Hey folks, i have a problem with using the osgShadow nodekit together with nested RTT-Cams. A scenegraph as illustrated in the following image works fine:
[Image: http://img7.imageshack.us/img7/5274/sgwithoutrttcam.png ] But problems arise, when i use an RTT-Cam to render this scenegraph to an FBO. The FBO is used as a texture which is put on a simple quad-geode. The quad-geode is then rendered by the Viewers-Camera with orthogonal projection. In fact all this stuff is done to apply warping in the fragment shader pass. The resulting scenegraph is illustrated in the following figure: [Image: http://img9.imageshack.us/img9/8421/sgwithrttcam.png ] The results are strange shadow artifacts. The shadows move with the RTT-Cameras viewpoint. In addition sometimes flickering in the shadows can be noticed. Except the shadows, the whole scene is rendered as it should be. At first, i thought it would have something to do with the shadowMap's cam. Line 192 in ShadowMap.cpp (osg 2.8.0) is Code: _camera->setReferenceFrame(osg::Camera::ABSOLUTE_RF_INHERIT_VIEWPOINT); If i understand the Reference Frame concept right, this line makes the shadowMaps cam inherit its viewpoint from the viewers cam and not the nested rtt-cam, which would be the right one. So i tried to set the Referende Frame to ABSOLUTE_RF by accessing the current camera in a cull-callback attached to the ShadowScene node. That did not help. Hope someone has a tip for me. Cheers, Felix ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15921#15921 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org