Hi,

            // The adapted luminance ppu do compute it. However if you
            // can follow me for now, you maybe encounter, that this ppu do
            // have to write into the same texture as it also read from.
            // To prevent this, we just generate an inout ppu which do
            // nothing than render the copy of input to the output.
            // We will use the output of this ppu as input for the
            // adapted luminance ppu. In this way we do not write to the
            // same texture as we have readed from.
            osgPPU::UnitInOut* adaptedlumCopy = new osgPPU::UnitInOut();
            adaptedlumCopy->setName("AdaptedLuminanceCopy");
            adaptedlumCopy->addChild(adaptedlum);

            // now connect the output of the adaptedlum with the rest where it 
is needed
            adaptedlum->addChild(adaptedlumCopy);

            adaptedlum->addChild(brightpass);
            brightpass->setInputToUniform(adaptedlum, "texAdaptedLuminance");

            adaptedlum->addChild(hdr);
            hdr->setInputToUniform(adaptedlum, "texAdaptedLuminance");

Thank you!

Cheers,
Mirro

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=76854#76854





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to