diff --git a/code/ColladaHelper.h b/code/ColladaHelper.h index d5bee24fa..a0e47a8f2 100644 --- a/code/ColladaHelper.h +++ b/code/ColladaHelper.h @@ -493,7 +493,7 @@ struct Effect mTexTransparent, mTexBump, mTexReflective; // Scalar factory - float mShininess, mRefractIndex; + float mShininess, mRefractIndex, mReflectivity; float mTransparency; // local params referring to each other by their SID @@ -518,6 +518,7 @@ struct Effect , mDoubleSided (false) , mWireframe (false) , mFaceted (false) + , mReflectivity (1.f) { } }; diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index 78ae57405..9e9a98e62 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -1147,6 +1147,7 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* pScene // scalar properties mat.AddProperty( &effect.mShininess, 1, AI_MATKEY_SHININESS); + mat.AddProperty( &effect.mReflectivity, 1, AI_MATKEY_REFLECTIVITY); mat.AddProperty( &effect.mRefractIndex, 1, AI_MATKEY_REFRACTI); // transparency, a very hard one. seemingly not all files are following the diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 4c34020e6..1638c200c 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -1135,6 +1135,8 @@ void ColladaParser::ReadEffectProfileCommon( Collada::Effect& pEffect) } else if( IsElement( "shininess")) ReadEffectFloat( pEffect.mShininess); + else if( IsElement( "reflectivity")) + ReadEffectFloat( pEffect.mReflectivity); /* Single scalar properties */ else if( IsElement( "transparency")) diff --git a/include/aiMaterial.h b/include/aiMaterial.h index f425530a2..da82680d0 100644 --- a/include/aiMaterial.h +++ b/include/aiMaterial.h @@ -754,6 +754,7 @@ extern "C" { #define AI_MATKEY_OPACITY "$mat.opacity",0,0 #define AI_MATKEY_BUMPSCALING "$mat.bumpscaling",0,0 #define AI_MATKEY_SHININESS "$mat.shininess",0,0 +#define AI_MATKEY_REFLECTIVITY "$mat.reflectivity",0,0 #define AI_MATKEY_SHININESS_STRENGTH "$mat.shinpercent",0,0 #define AI_MATKEY_REFRACTI "$mat.refracti",0,0 #define AI_MATKEY_COLOR_DIFFUSE "$clr.diffuse",0,0