SO3Engine
|
SO3CompositorLogic.cpp
Go to the documentation of this file.
29 inputCompositorInstance = ogreCompositorManager->addCompositor(targetViewport, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr", 0);
33 inputCompositorInstance->getTechnique()->getTargetPass(0)->getPass(0)->setClearColour(cachedViewportBackgroundColor);
42 ogreCompositorManager->removeCompositor(targetViewport, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr");
69 ogreCompositorManager->setCompositorEnabled(targetViewport, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr", true);
91 Ogre::StringVector resourceGroups = Ogre::ResourceGroupManager::getSingletonPtr()->getResourceGroups();
92 if(std::find(resourceGroups.begin(), resourceGroups.end(), SO3_INTERNAL_RESOURCE_GROUP) == resourceGroups.end())
95 // Generate a compositor that will render the scene (without transparent objects), and will old a texture to the blurred SSAO
116 inputCompositorInstance->getTechnique()->getTargetPass(0)->getPass(0)->setClearColour(cachedViewportBackgroundColor);
130 Ogre::CompositorPtr hdrCompositor = ogreCompositorManager->create(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr", SO3_INTERNAL_RESOURCE_GROUP);
134 hdrCompositionTechnique->setCompositorLogicName(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Logic");
140 Ogre::CompositionTechnique::TextureDefinition* solidsTexture = hdrCompositionTechnique->createTextureDefinition(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/Solids");
147 Ogre::CompositionTechnique::TextureDefinition* lum0Texture = hdrCompositionTechnique->createTextureDefinition(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum0");
153 Ogre::CompositionTechnique::TextureDefinition* lum1Texture = hdrCompositionTechnique->createTextureDefinition(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum1");
159 Ogre::CompositionTechnique::TextureDefinition* lum2Texture = hdrCompositionTechnique->createTextureDefinition(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum2");
165 Ogre::CompositionTechnique::TextureDefinition* lum3Texture = hdrCompositionTechnique->createTextureDefinition(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum3");
171 Ogre::CompositionTechnique::TextureDefinition* lum4Texture = hdrCompositionTechnique->createTextureDefinition(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum4");
181 Ogre::CompositionTechnique::TextureDefinition* brightTexture = hdrCompositionTechnique->createTextureDefinition(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/brigth");
188 Ogre::CompositionTechnique::TextureDefinition* bloom0Texture = hdrCompositionTechnique->createTextureDefinition(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/bloom0");
194 Ogre::CompositionTechnique::TextureDefinition* bloom1Texture = hdrCompositionTechnique->createTextureDefinition(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/bloom1");
201 Ogre::CompositionTargetPass* compositionTargetSolid = hdrCompositionTechnique->createTargetPass();
202 compositionTargetSolid->setOutputName(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/Solids");
211 Ogre::CompositionPass* compositionTargetSolidRenderScenePass = compositionTargetSolid->createPass();
217 Ogre::CompositionTargetPass* compositionTargetLum4 = hdrCompositionTechnique->createTargetPass();
218 compositionTargetLum4->setOutputName(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum4");
224 compositionTargetLum4QuadPass->setInput(0, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/Solids");
228 Ogre::CompositionTargetPass* compositionTargetLum3 = hdrCompositionTechnique->createTargetPass();
229 compositionTargetLum3->setOutputName(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum3");
235 compositionTargetLum3QuadPass->setInput(0, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum4");
239 Ogre::CompositionTargetPass* compositionTargetLum2 = hdrCompositionTechnique->createTargetPass();
240 compositionTargetLum2->setOutputName(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum2");
246 compositionTargetLum2QuadPass->setInput(0, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum3");
250 Ogre::CompositionTargetPass* compositionTargetLum1 = hdrCompositionTechnique->createTargetPass();
251 compositionTargetLum1->setOutputName(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum1");
257 compositionTargetLum1QuadPass->setInput(0, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum2");
261 Ogre::CompositionTargetPass* compositionTargetLum0 = hdrCompositionTechnique->createTargetPass();
262 compositionTargetLum0->setOutputName(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum0");
268 compositionTargetLum0QuadPass->setInput(0, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum1");
272 Ogre::CompositionTargetPass* compositionTargetBright = hdrCompositionTechnique->createTargetPass();
273 compositionTargetBright->setOutputName(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/brigth");
278 compositionTargetBrightQuadPass->setMaterialName("Ogre/Compositor/HDR/Downsample3x3Brightpass");
279 compositionTargetBrightQuadPass->setInput(0, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/Solids");
280 compositionTargetBrightQuadPass->setInput(1, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum0");
284 Ogre::CompositionTargetPass* compositionTargetBloom1 = hdrCompositionTechnique->createTargetPass();
285 compositionTargetBloom1->setOutputName(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/bloom1");
291 compositionTargetBloom1QuadPass->setInput(0, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/brigth");
295 Ogre::CompositionTargetPass* compositionTargetBloom0 = hdrCompositionTechnique->createTargetPass();
296 compositionTargetBloom0->setOutputName(std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/bloom0");
302 compositionTargetBloom0QuadPass->setInput(0, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/bloom1");
306 Ogre::CompositionTargetPass* compositionOutTarget = hdrCompositionTechnique->getOutputTargetPass();
311 compositionOutTargetQuadPass->setInput(0, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/Solids");
312 compositionOutTargetQuadPass->setInput(1, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/bloom0");
313 compositionOutTargetQuadPass->setInput(2, std::string(SO3_INTERNAL_RESOURCE_GROUP)+"/Hdr/Input/Texture/lum0");
Definition SO3DataScol.h:38
Generated by 1.9.8