SO3Engine
|
SO3DeferredShading.cpp
Go to the documentation of this file.
154 SO3_EXCEPT(SExceptionItemIdentity, "Trying to register an already registered viewport!", "SDeferredShading::RegisterViewport", true);
161 // Check graphic card capabilities. We do this here cause we have to be certain that a render window exists before checking capabilities
166 if (!ogreCapabilities->hasCapability(Ogre::RSC_VERTEX_PROGRAM) || !(ogreCapabilities->hasCapability(Ogre::RSC_FRAGMENT_PROGRAM)))
167 SO3_EXCEPT(SExceptionUnimplemented, "Your card does not support vertex and fragment programs!", "SDeferredShading::SDeferredShading", true);
171 SO3_EXCEPT(SExceptionUnimplemented, "Your card does not support at least two simultaneous render targets!", "SDeferredShading::SDeferredShading", true);
175 availableGBufferMap.insert(AvailableGBufferMap::value_type(currentGBuffer->GetName(), currentGBuffer));
180 Ogre::LogManager::getSingleton().logMessage("Your card does not support at least four simultaneous render targets, high resolution deferred will not be available!");
186 availableGBufferMap.insert(AvailableGBufferMap::value_type(currentGBuffer->GetName(), currentGBuffer));
209 viewportGBufferFilters->gBufferInstance = compMan.addCompositor(ogreTargetViewport, compositorGBuffer->GetCompositor(currentGBuffer)->getName(), 0);
210 //viewportGBufferFilters->gBufferInstance->getTechnique()->getTargetPass(0)->getPass(0)->setClearColour(targetViewport->getBackgroundColour());
213 viewportGBufferFilters->gBufferCompositors[SO3_DEFERRED_SHOWLIT] = compMan.addCompositor(ogreTargetViewport, compositorLighting->GetCompositor(currentGBuffer)->getName(), 1);
214 viewportGBufferFilters->gBufferCompositors[SO3_DEFERRED_SHOWCOLOUR] = compMan.addCompositor(ogreTargetViewport, compositorShowDiffuse->GetCompositor(currentGBuffer)->getName());
215 viewportGBufferFilters->gBufferCompositors[SO3_DEFERRED_SHOWNORMALS] = compMan.addCompositor(ogreTargetViewport, compositorShowNormal->GetCompositor(currentGBuffer)->getName());
216 viewportGBufferFilters->gBufferCompositors[SO3_DEFERRED_SHOWDEPTH] = compMan.addCompositor(ogreTargetViewport, compositorShowDepth->GetCompositor(currentGBuffer)->getName());
217 viewportGBufferFilters->gBufferCompositors[SO3_DEFERRED_SHOWSPECULAR] = compMan.addCompositor(ogreTargetViewport, compositorShowSpecular->GetCompositor(currentGBuffer)->getName());
218 viewportGBufferFilters->gBufferCompositors[SO3_DEFERRED_SHOWEMISSIVE] = compMan.addCompositor(ogreTargetViewport, compositorShowEmissive->GetCompositor(currentGBuffer)->getName());
219 viewportGBufferFilters->gBufferCompositors[SO3_DEFERRED_SHOWVELOCITY] = compMan.addCompositor(ogreTargetViewport, compositorShowVelocity->GetCompositor(currentGBuffer)->getName());
220 viewportGBufferFilters->gBufferCompositors[SO3_DEFERRED_SHOWMATERIALID] = compMan.addCompositor(ogreTargetViewport, compositorShowMaterialID->GetCompositor(currentGBuffer)->getName());
223 viewportGBufferFilters->ssaoCompositor = compMan.addCompositor(ogreTargetViewport, compositorSSAO->GetCompositor(currentGBuffer)->getName(), 2);
226 viewportGBufferFilters->antiAliasingCompositors[SO3_DEFERRED_SSAA - 1] = compMan.addCompositor(ogreTargetViewport, compositorSSAA->GetCompositor(currentGBuffer)->getName());
227 viewportGBufferFilters->antiAliasingCompositors[SO3_DEFERRED_NFAA - 1] = compMan.addCompositor(ogreTargetViewport, compositorNFAA->GetCompositor(currentGBuffer)->getName());
245 // SO3_EXCEPT(SExceptionItemNotFound, "Trying to unregister a viewport that is not registered!", "SDeferredShading::UnregisterViewport", true);
332void SDeferredShading::SetAntiAliasing(SViewPort* existingViewport, SDeferredShading::DeferredShadingAntiAliasingMode newMode)
librairies include
Ogre::CompositorPtr GetCompositor(SGBuffer *gBuffer)
Definition SO3DeferredCompositor.cpp:40
Definition SO3DeferredShading.h:59
static SDeferredShading * getSingletonPtr()
Definition SO3DeferredShading.cpp:139
static const Ogre::uint8 PRE_GBUFFER_RENDER_QUEUE
Definition SO3DeferredShading.h:148
void SetAntiAliasing(SViewPort *existingViewport, DeferredShadingAntiAliasingMode newMode)
Definition SO3DeferredShading.cpp:332
DeferredShadingAntiAliasingMode
Definition SO3DeferredShading.h:76
@ SO3_DEFERRED_AA_COUNT
Definition SO3DeferredShading.h:81
void SetSSAO(SViewPort *existingViewport, bool ssao)
Definition SO3DeferredShading.cpp:320
void UnregisterViewport(SViewPort *existingViewport)
Definition SO3DeferredShading.cpp:241
static SDeferredShading & getSingleton()
Definition SO3DeferredShading.cpp:144
std::map< SViewPort *, GBufferFilters * > OgreViewportList
Definition SO3DeferredShading.h:95
OgreViewportList ogreViewportList
Definition SO3DeferredShading.h:96
void UnregisterAllViewports()
Definition SO3DeferredShading.cpp:274
static const Ogre::uint8 POST_GBUFFER_RENDER_QUEUE
Definition SO3DeferredShading.h:154
void RegisterViewport(SViewPort *targetViewport)
Definition SO3DeferredShading.cpp:150
DeferredShadingMode GetMode() const
Definition SO3DeferredShading.cpp:351
@ SO3_DEFERRED_SHOWMATERIALID
Definition SO3DeferredShading.h:70
void SetMode(DeferredShadingMode mode)
Definition SO3DeferredShading.cpp:286
SGBufferMaterialGenerator * GetGBufferMaterialGenerator()
Definition SO3DeferredShading.cpp:361
SException indicating that an attempt to create a new item with a given identifier fails cause anothe...
Definition SO3Exception.h:165
SException indicating that a call to an unimplemented functionnality was done.
Definition SO3Exception.h:105
Definition SO3GBufferHigh.h:37
Definition SO3GBuffer.h:37
Definition SO3GBufferLow.h:38
Definition SO3SSAOLogic.h:54
Definition SO3ViewPort.h:56
Ogre::Viewport * GetOgreViewPortPointer()
Definition SO3ViewPort.cpp:98
Definition SO3DataScol.h:38
Ogre::CompositorInstance * ssaoCompositor
Definition SO3DeferredShading.h:91
GBufferCompositors gBufferCompositors
Definition SO3DeferredShading.h:90
AntiAliasingCompositors antiAliasingCompositors
Definition SO3DeferredShading.h:92
Ogre::CompositorInstance * gBufferInstance
Definition SO3DeferredShading.h:89
Generated by 1.9.8