Hi, I'm looking to modify the amount of reflections intensity inside ocean. I'm using last trunk rev 258.
I'm stuck into this piece of code inside OceanScene: Code: _reflectionMatrix = osg::Matrixf( 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 2 * _oceanScene->getOceanSurfaceHeight(), 1 ); osg::ref_ptr<osg::Texture2D> reflectionTexture = _oceanScene->createTexture2D( _oceanScene->_reflectionTexSize, GL_RGBA ); // clip everything below water line _reflectionCamera = _oceanScene->renderToTexturePass( reflectionTexture.get() ); _reflectionCamera->setClearColor( osg::Vec4( 0.0, 0.0, 0.0, 0.0 ) ); _reflectionCamera->setComputeNearFarMode( osg::Camera::DO_NOT_COMPUTE_NEAR_FAR ); _reflectionCamera->setCullMask( _oceanScene->_reflectionSceneMask ); _reflectionCamera->setCullCallback( new CameraCullCallback(_oceanScene.get()) ); _reflectionCamera->getOrCreateStateSet()->setMode( GL_CLIP_PLANE0+0, osg::StateAttribute::ON ); _reflectionCamera->getOrCreateStateSet()->setMode( GL_CULL_FACE, osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE ); _surfaceStateSet->setTextureAttributeAndModes( _oceanScene->_reflectionUnit, reflectionTexture.get(), osg::StateAttribute::ON ); I think that I should operate on texture properties, maybe the shader but right now I'm not able to see a significative change on intensity reflection effect...Someone can suggest to me a way? Thank you! Cheers, Dario[/code] ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56514#56514 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org