SO3Engine
|
SO3GBufferSchemeHandler.cpp
Go to the documentation of this file.
51SGBufferSchemeHandler::SGBufferSchemeHandler(SGBufferMaterialGenerator* materialGeneratorInstance)
61Ogre::Technique* SGBufferSchemeHandler::handleSchemeNotFound(unsigned short schemeIndex, const Ogre::String& schemeName, Ogre::Material* originalMaterial, unsigned short lodIndex, const Ogre::Renderable* rend)
126 const Ogre::MaterialPtr& templateMat = materialGenerator->GetMaterial(SDeferredShading::getSingleton().GetGBuffer(), perm);
135SGBufferSchemeHandler::PassProperties SGBufferSchemeHandler::InspectPass(Ogre::Pass* pass, unsigned short lodIndex, const Ogre::Renderable* rend)
204bool SGBufferSchemeHandler::CheckNormalMap(Ogre::TextureUnitState* tus, SGBufferSchemeHandler::PassProperties& props, const Ogre::String& lowerCaseName, const Ogre::String& lowerCaseAlias, const Ogre::String& lowerCaseFileName)
210 ((lowerCaseName.find(NORMAL_MAP_PATTERN1) != Ogre::String::npos) || (lowerCaseName.find(NORMAL_MAP_PATTERN2) != Ogre::String::npos) ||
211 (lowerCaseName.find(NORMAL_MAP_PATTERN3) != Ogre::String::npos) || (lowerCaseName.find(NORMAL_MAP_PATTERN4) != Ogre::String::npos) ||
212 (lowerCaseName.find(NORMAL_MAP_PATTERN5) != Ogre::String::npos) || (lowerCaseName.find(NORMAL_MAP_PATTERN6) != Ogre::String::npos) ||
221 ((lowerCaseAlias.find(NORMAL_MAP_PATTERN1) != Ogre::String::npos) || (lowerCaseAlias.find(NORMAL_MAP_PATTERN2) != Ogre::String::npos) ||
222 (lowerCaseAlias.find(NORMAL_MAP_PATTERN3) != Ogre::String::npos) || (lowerCaseAlias.find(NORMAL_MAP_PATTERN4) != Ogre::String::npos) ||
223 (lowerCaseAlias.find(NORMAL_MAP_PATTERN5) != Ogre::String::npos) || (lowerCaseAlias.find(NORMAL_MAP_PATTERN6) != Ogre::String::npos) ||
232 ((lowerCaseFileName.find(NORMAL_MAP_PATTERN1) != Ogre::String::npos) || (lowerCaseFileName.find(NORMAL_MAP_PATTERN2) != Ogre::String::npos) ||
233 (lowerCaseFileName.find(NORMAL_MAP_PATTERN3) != Ogre::String::npos) || (lowerCaseFileName.find(NORMAL_MAP_PATTERN4) != Ogre::String::npos) ||
234 (lowerCaseFileName.find(NORMAL_MAP_PATTERN5) != Ogre::String::npos) || (lowerCaseFileName.find(NORMAL_MAP_PATTERN6) != Ogre::String::npos) ||
252bool SGBufferSchemeHandler::CheckSpecularMap(Ogre::TextureUnitState* tus, SGBufferSchemeHandler::PassProperties& props, const Ogre::String& lowerCaseName, const Ogre::String& lowerCaseAlias, const Ogre::String& lowerCaseFileName)
256 // Check if the texture unit alias contains our speculat pattern, first condition for efficiency
258 ((lowerCaseName.find(SPECULAR_MAP_PATTERN1) != Ogre::String::npos) || (lowerCaseName.find(SPECULAR_MAP_PATTERN2) != Ogre::String::npos)))
264 // Check if the texture unit alias contains our speculat pattern, first condition for efficiency
266 ((lowerCaseAlias.find(SPECULAR_MAP_PATTERN1) != Ogre::String::npos) || (lowerCaseAlias.find(SPECULAR_MAP_PATTERN2) != Ogre::String::npos)))
274 ((lowerCaseFileName.find(SPECULAR_MAP_PATTERN1) != Ogre::String::npos) || (lowerCaseFileName.find(SPECULAR_MAP_PATTERN2) != Ogre::String::npos)))
291bool SGBufferSchemeHandler::CheckLightMap(Ogre::TextureUnitState* tus, SGBufferSchemeHandler::PassProperties& props, const Ogre::String& lowerCaseName, const Ogre::String& lowerCaseAlias, const Ogre::String& lowerCaseFileName)
295 // Check if the texture unit alias contains our lightmap pattern, first condition for efficiency
305 // Check if the texture unit alias contains our lightmap pattern, first condition for efficiency
369 SO3_EXCEPT(SExceptionUnimplemented, "Can not generate G-Buffer materials for '>3 texture' objects", "SGBufferSchemeHandler::GetPermutation", true);
399void SGBufferSchemeHandler::FillPass(Ogre::Pass* gBufferPass, Ogre::Pass* originalPass, const PassProperties& props)
429 Ogre::GpuProgramParametersSharedPtr fragProgParams = gBufferPass->getFragmentProgramParameters();
static SDeferredShading & getSingleton()
Definition SO3DeferredShading.cpp:144
SException indicating that a call to an unimplemented functionnality was done.
Definition SO3Exception.h:105
@ SO3_GBP_HAS_DIFFUSE_COLOUR
Definition SO3GBufferMaterialPermutation.h:50
@ SO3_GBP_ONE_TEXCOORD
Definition SO3GBufferMaterialPermutation.h:57
@ SO3_GBP_LIGHT_MAP
Definition SO3GBufferMaterialPermutation.h:65
@ SO3_GBP_HAS_ALPHA_REJECTION
Definition SO3GBufferMaterialPermutation.h:53
@ SO3_GBP_SPECULAR_MAP
Definition SO3GBufferMaterialPermutation.h:68
@ SO3_GBP_HAS_EMISSIVE_COLOUR
Definition SO3GBufferMaterialPermutation.h:52
@ SO3_GBP_NO_TEXTURES
Definition SO3GBufferMaterialPermutation.h:43
@ SO3_GBP_SKINNED
Definition SO3GBufferMaterialPermutation.h:71
@ SO3_GBP_TWO_TEXTURES
Definition SO3GBufferMaterialPermutation.h:45
@ SO3_GBP_HAS_SPECULAR_COLOUR
Definition SO3GBufferMaterialPermutation.h:51
@ SO3_GBP_NORMAL_MAP
Definition SO3GBufferMaterialPermutation.h:62
@ SO3_GBP_NO_TEXCOORDS
Definition SO3GBufferMaterialPermutation.h:56
@ SO3_GBP_THREE_TEXTURES
Definition SO3GBufferMaterialPermutation.h:46
@ SO3_GBP_ONE_TEXTURE
Definition SO3GBufferMaterialPermutation.h:44
static const Ogre::String NORMAL_MAP_PATTERN1
Definition SO3GBufferSchemeHandler.h:46
PassProperties InspectPass(Ogre::Pass *pass, unsigned short lodIndex, const Ogre::Renderable *rend)
Definition SO3GBufferSchemeHandler.cpp:135
static const Ogre::String NORMAL_MAP_PATTERN3
Definition SO3GBufferSchemeHandler.h:48
static const Ogre::String LIGHT_MAP_PATTERN1
Definition SO3GBufferSchemeHandler.h:55
static const Ogre::String NORMAL_MAP_PATTERN7
Definition SO3GBufferSchemeHandler.h:52
void FillPass(Ogre::Pass *gBufferPass, Ogre::Pass *originalPass, const PassProperties &props)
Definition SO3GBufferSchemeHandler.cpp:399
bool CheckSpecularMap(Ogre::TextureUnitState *tus, PassProperties &props, const Ogre::String &lowerCaseName, const Ogre::String &lowerCaseAlias, const Ogre::String &lowerCaseFileName)
Definition SO3GBufferSchemeHandler.cpp:252
static const Ogre::String LIGHT_MAP_PATTERN2
Definition SO3GBufferSchemeHandler.h:56
static const Ogre::String NORMAL_MAP_PATTERN5
Definition SO3GBufferSchemeHandler.h:50
static const Ogre::String NORMAL_MAP_PATTERN6
Definition SO3GBufferSchemeHandler.h:51
SGBufferMaterialPermutation GetPermutation(const PassProperties &props)
Definition SO3GBufferSchemeHandler.cpp:336
static const Ogre::String LIGHT_MAP_PATTERN3
Definition SO3GBufferSchemeHandler.h:57
static const Ogre::String SPECULAR_MAP_PATTERN1
Definition SO3GBufferSchemeHandler.h:53
virtual Ogre::Technique * handleSchemeNotFound(unsigned short schemeIndex, const Ogre::String &schemeName, Ogre::Material *originalMaterial, unsigned short lodIndex, const Ogre::Renderable *rend)
Definition SO3GBufferSchemeHandler.cpp:61
bool CheckNormalMap(Ogre::TextureUnitState *tus, PassProperties &props, const Ogre::String &lowerCaseName, const Ogre::String &lowerCaseAlias, const Ogre::String &lowerCaseFileName)
Definition SO3GBufferSchemeHandler.cpp:204
SGBufferMaterialGenerator * materialGenerator
Definition SO3GBufferSchemeHandler.h:59
static const Ogre::String NORMAL_MAP_PATTERN2
Definition SO3GBufferSchemeHandler.h:47
bool CheckLightMap(Ogre::TextureUnitState *tus, PassProperties &props, const Ogre::String &lowerCaseName, const Ogre::String &lowerCaseAlias, const Ogre::String &lowerCaseFileName)
Definition SO3GBufferSchemeHandler.cpp:291
static const Ogre::String SPECULAR_MAP_PATTERN2
Definition SO3GBufferSchemeHandler.h:54
static const Ogre::String NORMAL_MAP_PATTERN4
Definition SO3GBufferSchemeHandler.h:49
const Ogre::MaterialPtr & GetMaterial(SGBuffer *gbuffer, PERMUTATION_CLASS permutation)
Definition SO3MaterialGenerator.h:275
Definition SO3DataScol.h:38
Ogre::vector< Ogre::TextureUnitState * >::type regularTextures
Definition SO3GBufferSchemeHandler.h:63
bool hasDiffuseColour
Definition SO3GBufferSchemeHandler.h:68
bool isSkinned
Definition SO3GBufferSchemeHandler.h:67
bool hasAlphaRejection
Definition SO3GBufferSchemeHandler.h:71
bool isDeferred
Definition SO3GBufferSchemeHandler.h:62
Ogre::TextureUnitState * normalMap
Definition SO3GBufferSchemeHandler.h:64
bool hasSpecularColour
Definition SO3GBufferSchemeHandler.h:69
Ogre::TextureUnitState * lightMap
Definition SO3GBufferSchemeHandler.h:66
bool hasEmissiveColour
Definition SO3GBufferSchemeHandler.h:70
Ogre::TextureUnitState * specularMap
Definition SO3GBufferSchemeHandler.h:65
Generated by 1.9.8