75 value = parameterValue;
83 enum SsaoGBufferLayout
85 SO3_SSAO_GBUFFER_NONE,
86 SO3_SSAO_GBUFFER_DEPTH_ONLY,
87 SO3_SSAO_GBUFFER_NORMAL_POSITION,
91 static bool compositorCreated;
95 Ogre::String targetViewportScheme;
96 Ogre::CompositorManager* ogreCompositorManager;
97 Ogre::MaterialManager* ogreMaterialManager;
98 Ogre::GpuProgramManager* ogreProgramManager;
100 Ogre::CompositorInstance* inputCompositorInstance;
101 Ogre::CompositorInstance* normalCompositorInstance;
102 Ogre::MaterialPtr normalPositionMaterial;
103 Ogre::MaterialPtr normalPositionAlphaRejectionMaterial;
104 Ogre::MaterialPtr normalPositionMaterialTransparent;
105 Ogre::MaterialPtr crytekSsaoMaterial;
106 Ogre::MaterialPtr hemisphericSsaoMaterial;
107 Ogre::MaterialPtr creaseShadingSsaoMaterial;
108 Ogre::GpuProgramPtr ssaoRenderQuadVp;
109 Ogre::GpuProgramPtr ssaoDepthDebugCompositorFp;
110 Ogre::GpuProgramPtr normalPositionGeneratorVp;
111 Ogre::GpuProgramPtr normalPositionGeneratorFp;
112 Ogre::GpuProgramPtr normalPositionAlphaRejectionGeneratorVp;
113 Ogre::GpuProgramPtr normalPositionAlphaRejectionGeneratorFp;
114 Ogre::GpuProgramPtr ssaoNormalDebugCompositorFp;
115 Ogre::GpuProgramPtr ssaoPositionDebugCompositorFp;
116 Ogre::GpuProgramPtr ssaoDepth2DebugCompositorFp;
117 Ogre::GpuProgramPtr ssaoCrytekCompositorFp;
118 Ogre::GpuProgramPtr ssaoHemiCompositorFp;
119 Ogre::GpuProgramPtr ssaoCreaseCompositorFp;
120 Ogre::GpuProgramPtr filterBoxCompositorFp;
121 Ogre::GpuProgramPtr filterBoxSmartCompositorFp;
122 Ogre::GpuProgramPtr filterBoxSmart2CompositorFp;
123 Ogre::GpuProgramPtr ssaoDebugCompositorFp;
124 Ogre::GpuProgramPtr ssaoMergingCompositorFp;
126 SsaoGBufferLayout currentSsaoGbufferLayout;
130 typedef std::map<SsaoTechnique, SsaoTechniqueParameters> SsaoTechniqueParametersByTechnique;
131 static SsaoTechniqueParametersByTechnique ssaoTechniquesParameters;
132 bool mSupportGbuffer;
197 virtual Ogre::Technique*
handleSchemeNotFound(
unsigned short schemeIndex,
const Ogre::String& schemeName, Ogre::Material* originalMaterial,
unsigned short lodIndex,
const Ogre::Renderable* rend);
211 Ogre::GpuProgramPtr createGpuProgram(
const Ogre::String &Name,
const bool& fragment,
const Ogre::String& Data);
216 void GenerateRenderQuadVertexShader();
221 void CreateCompositors();
226 void GenerateSsaoCompositor();
231 void GenerateDepthDebugCompositor();
239 void GenerateNormalPositionCompositor();
244 void GenerateNormalDebugCompositor();
249 void GenerateViewPositionDebugCompositor();
254 void GenerateDepthDebugCompositor2();
259 void GenerateSsaoCrytekCompositor();
264 void GenerateSsaoHemisphericCompositor();
281 void GenerateSsaoCreaseShadingCompositor();
291 void GenerateFilterBoxCompositor();
301 void GenerateFilterBoxSmartCompositor();
311 void GenerateFilterBoxSmartCompositor2();
316 void GenerateSsaoDebugCompositor();
321 void GenerateMergingCompositor();
326 SsaoGBufferLayout GetGBufferLayout(
const SsaoTechnique& technique);