SO3Engine
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Attributes | List of all members
SO3::SDeferredShading Class Reference

#include <SO3DeferredShading.h>

Inheritance diagram for SO3::SDeferredShading:

Classes

struct  GBufferFilters
 

Public Types

enum  DeferredShadingMode {
  SO3_DEFERRED_SHOWLIT = 0 , SO3_DEFERRED_SHOWCOLOUR = 1 , SO3_DEFERRED_SHOWNORMALS = 2 , SO3_DEFERRED_SHOWDEPTH = 3 ,
  SO3_DEFERRED_SHOWSPECULAR = 4 , SO3_DEFERRED_SHOWEMISSIVE = 5 , SO3_DEFERRED_SHOWVELOCITY = 6 , SO3_DEFERRED_SHOWMATERIALID = 7 ,
  SO3_DEFERRED_COUNT = 8
}
 
enum  DeferredShadingAntiAliasingMode { SO3_DEFERRED_AA_NONE = 0 , SO3_DEFERRED_SSAA = 1 , SO3_DEFERRED_NFAA = 2 , SO3_DEFERRED_AA_COUNT = 2 }
 

Public Member Functions

 SDeferredShading ()
 
 ~SDeferredShading ()
 
void RegisterViewport (SViewPort *targetViewport)
 
void UnregisterViewport (SViewPort *existingViewport)
 
void UnregisterAllViewports ()
 
void SetSSAO (SViewPort *existingViewport, bool ssao)
 
void SetAntiAliasing (SViewPort *existingViewport, DeferredShadingAntiAliasingMode newMode)
 
void SetMode (DeferredShadingMode mode)
 
DeferredShadingMode GetMode () const
 
SGBufferGetGBuffer ()
 
SGBufferMaterialGeneratorGetGBufferMaterialGenerator ()
 

Static Public Member Functions

static SDeferredShadinggetSingleton ()
 
static SDeferredShadinggetSingletonPtr ()
 

Static Public Attributes

static const Ogre::uint8 PRE_GBUFFER_RENDER_QUEUE = Ogre::RENDER_QUEUE_2
 
static const Ogre::uint8 POST_GBUFFER_RENDER_QUEUE = Ogre::RENDER_QUEUE_8
 

Protected Types

typedef Ogre::CompositorInstance * GBufferCompositors[SO3_DEFERRED_COUNT]
 
typedef Ogre::CompositorInstance * AntiAliasingCompositors[SO3_DEFERRED_AA_COUNT]
 
typedef std::map< SViewPort *, GBufferFilters * > OgreViewportList
 

Protected Attributes

OgreViewportList ogreViewportList
 
DeferredShadingMode currentMode
 

Detailed Description

System to manage Deferred Shading for a camera/render target. Inspired from ogre's deferred shading demo framework

Definition at line 58 of file SO3DeferredShading.h.

Member Typedef Documentation

◆ AntiAliasingCompositors

typedef Ogre::CompositorInstance* SO3::SDeferredShading::AntiAliasingCompositors[SO3_DEFERRED_AA_COUNT]
protected

Definition at line 86 of file SO3DeferredShading.h.

◆ GBufferCompositors

typedef Ogre::CompositorInstance* SO3::SDeferredShading::GBufferCompositors[SO3_DEFERRED_COUNT]
protected

Definition at line 85 of file SO3DeferredShading.h.

◆ OgreViewportList

Definition at line 95 of file SO3DeferredShading.h.

Member Enumeration Documentation

◆ DeferredShadingAntiAliasingMode

Enumerator
SO3_DEFERRED_AA_NONE 
SO3_DEFERRED_SSAA 
SO3_DEFERRED_NFAA 
SO3_DEFERRED_AA_COUNT 

Definition at line 75 of file SO3DeferredShading.h.

◆ DeferredShadingMode

Enumerator
SO3_DEFERRED_SHOWLIT 

The deferred shading mode.

SO3_DEFERRED_SHOWCOLOUR 

Show diffuse (for debugging)

SO3_DEFERRED_SHOWNORMALS 

Show normals (for debugging)

SO3_DEFERRED_SHOWDEPTH 

Show depth channel (for debugging)

SO3_DEFERRED_SHOWSPECULAR 

Show specular channel (for debugging)

SO3_DEFERRED_SHOWEMISSIVE 

Show emissive channel (for debugging)

SO3_DEFERRED_SHOWVELOCITY 

Show velocity vector (for debugging)

SO3_DEFERRED_SHOWMATERIALID 
SO3_DEFERRED_COUNT 

Definition at line 61 of file SO3DeferredShading.h.

Constructor & Destructor Documentation

◆ SDeferredShading()

SO3::SDeferredShading::SDeferredShading ( )

ctor

Definition at line 45 of file SO3DeferredShading.cpp.

◆ ~SDeferredShading()

SO3::SDeferredShading::~SDeferredShading ( )

dtor

Definition at line 78 of file SO3DeferredShading.cpp.

Member Function Documentation

◆ GetGBuffer()

SGBuffer * SO3::SDeferredShading::GetGBuffer ( )

Definition at line 356 of file SO3DeferredShading.cpp.

◆ GetGBufferMaterialGenerator()

SGBufferMaterialGenerator * SO3::SDeferredShading::GetGBufferMaterialGenerator ( )

Definition at line 361 of file SO3DeferredShading.cpp.

◆ GetMode()

SDeferredShading::DeferredShadingMode SO3::SDeferredShading::GetMode ( ) const

Definition at line 351 of file SO3DeferredShading.cpp.

◆ getSingleton()

SDeferredShading & SO3::SDeferredShading::getSingleton ( )
static

Definition at line 144 of file SO3DeferredShading.cpp.

◆ getSingletonPtr()

SDeferredShading * SO3::SDeferredShading::getSingletonPtr ( )
static

Definition at line 139 of file SO3DeferredShading.cpp.

◆ RegisterViewport()

void SO3::SDeferredShading::RegisterViewport ( SViewPort targetViewport)

Definition at line 150 of file SO3DeferredShading.cpp.

◆ SetAntiAliasing()

void SO3::SDeferredShading::SetAntiAliasing ( SViewPort existingViewport,
SDeferredShading::DeferredShadingAntiAliasingMode  newMode 
)

Definition at line 332 of file SO3DeferredShading.cpp.

◆ SetMode()

void SO3::SDeferredShading::SetMode ( DeferredShadingMode  mode)

Set rendering mode (one of DSMode)

Definition at line 286 of file SO3DeferredShading.cpp.

◆ SetSSAO()

void SO3::SDeferredShading::SetSSAO ( SViewPort existingViewport,
bool  ssao 
)

Definition at line 320 of file SO3DeferredShading.cpp.

◆ UnregisterAllViewports()

void SO3::SDeferredShading::UnregisterAllViewports ( )

Definition at line 274 of file SO3DeferredShading.cpp.

◆ UnregisterViewport()

void SO3::SDeferredShading::UnregisterViewport ( SViewPort existingViewport)

Definition at line 241 of file SO3DeferredShading.cpp.

Member Data Documentation

◆ currentMode

DeferredShadingMode SO3::SDeferredShading::currentMode
protected

Definition at line 97 of file SO3DeferredShading.h.

◆ ogreViewportList

OgreViewportList SO3::SDeferredShading::ogreViewportList
protected

Definition at line 96 of file SO3DeferredShading.h.

◆ POST_GBUFFER_RENDER_QUEUE

const Ogre::uint8 SO3::SDeferredShading::POST_GBUFFER_RENDER_QUEUE = Ogre::RENDER_QUEUE_8
static

The first render queue that does not get rendered into the GBuffer place transparent (or other non gbuffer) objects after this one

Definition at line 154 of file SO3DeferredShading.h.

◆ PRE_GBUFFER_RENDER_QUEUE

const Ogre::uint8 SO3::SDeferredShading::PRE_GBUFFER_RENDER_QUEUE = Ogre::RENDER_QUEUE_2
static

The first render queue that does get rendered into the GBuffer place objects (like skies) that should be before gbuffer before this one.

Definition at line 148 of file SO3DeferredShading.h.


The documentation for this class was generated from the following files: