void COgreManager::ApplySsaoParams() { Material* mat = static_cast<Material*>(MaterialManager::getSingleton().getByName("SSAO/Crytek").get()); assert(mat); auto gpuParams = mat->getTechnique(0)->getPass(0)->getFragmentProgramParameters(); gpuParams->setNamedConstant("cSampleLengthScreenSpace", Ogre::StringConverter::parseReal(m_ssaoParams["SampleLength"])/100); gpuParams->setNamedConstant("cOffsetScale", Ogre::StringConverter::parseReal(m_ssaoParams["OffsetScale"])/100); gpuParams->setNamedConstant("cDefaultAccessibility", Ogre::StringConverter::parseReal(m_ssaoParams["DefaultAccessibility"])); gpuParams->setNamedConstant("cEdgeHighlight", Ogre::StringConverter::parseReal(m_ssaoParams["EdgeHighlight"])); ResetEffect(); RenderManager.EnableSSAO(m_effectCfg.bSSAO); }
void CPaletteManager::SaveEffectAndReset (void) { SaveEffect (); ResetEffect (); LoadEffect (); }