By using the addon, you'll be able to implement postfilter effects in Ogre just like you think about the compounding passes: i'll obviously release the code, but i need to clean it up and debug it a little more.
While testing it, i ported the good old heat vision effect:
Then, i fired up RenderMonkey and exported my 3-passes bloom effect: i've exported it with the free Ogre's RenderMonkey exporter and then manually adjusted.
While the bloom was already done (i coded it time ago), the entire Ogre implementation process has required no more than 1 minutes (!), just the time to remember the filter chain
Here are some shoots of the original "Samples/CubeMapping" demo with the bloom addition.
i love this one!
And here are the Ogre's implementations:
HeatVision
Code: Select all
RenderTexture* rt0 = SharedData::getSingleton().iRoot->getRenderSystem()->createRenderTexture( "rt0", 256, 256 );
setupRenderTextureAndViewport( rt0 );
OgrePostFilterPass *pass0, *pass1;
pass0 = new OgrePostFilterPass( "Fury/HeatVision/LightToHeat" );
pass0->addInputTexture( NULL );
pass0->setOutputTexture( rt0 );
pass1 = new OgrePostFilterPass( "Fury/HeatVision/Blur" );
pass1->addInputTexture( rt0 );
pass1->setOutputTexture( NULL );
filterPasses.push_back( pass0 );
filterPasses.push_back( pass1 );
Bloom
Code: Select all
RenderTexture* rt0 = SharedData::getSingleton().iRoot->getRenderSystem()->createRenderTexture( "rt0", 128, 128 );
setupRenderTextureAndViewport( rt0 );
RenderTexture* rt1 = SharedData::getSingleton().iRoot->getRenderSystem()->createRenderTexture( "rt1", 256, 256 );
setupRenderTextureAndViewport( rt1 );
OgrePostFilterPass *pass0, *pass1, *pass2;
pass0 = new OgrePostFilterPass( "PostFilters/Blur0" );
pass0->addInputTexture( NULL );
pass0->setOutputTexture( rt0 );
filterPasses.push_back( pass0 );
pass1 = new OgrePostFilterPass( "PostFilters/Blur1" );
pass1->addInputTexture( rt0 );
pass1->setOutputTexture( rt1 );
filterPasses.push_back( pass1 );
pass2 = new OgrePostFilterPass( "PostFilters/Bloom" );
pass2->addInputTexture( NULL );
pass2->addInputTexture( rt1 );
pass2->setOutputTexture( NULL );
filterPasses.push_back( pass2 );
As soon as i'll find the time to clean it up and testing a bit more i'll release it