diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index 1c8a39495..f11ce589a 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -333,8 +333,16 @@ void ColladaLoader::BuildLightsForNode( const ColladaParser& pParser, const Coll out->mAttenuationLinear = srcLight->mAttLinear; out->mAttenuationQuadratic = srcLight->mAttQuadratic; - // collada doesn't differenciate between these color types out->mColorDiffuse = out->mColorSpecular = out->mColorAmbient = srcLight->mColor*srcLight->mIntensity; + if (out->mType == aiLightSource_AMBIENT) { + out->mColorDiffuse = out->mColorSpecular = aiColor3D(0, 0, 0); + out->mColorAmbient = srcLight->mColor*srcLight->mIntensity; + } + else { + // collada doesn't differentiate between these color types + out->mColorDiffuse = out->mColorSpecular = srcLight->mColor*srcLight->mIntensity; + out->mColorAmbient = aiColor3D(0, 0, 0); + } // convert falloff angle and falloff exponent in our representation, if given if (out->mType == aiLightSource_SPOT) { diff --git a/test/models/Collada/cube.dae b/test/models/Collada/cube.dae index ad351c77e..435ba2da7 100644 --- a/test/models/Collada/cube.dae +++ b/test/models/Collada/cube.dae @@ -69,6 +69,13 @@ limitations under the License. 1.000000 + + + + 0.1 0.1 0.2 + + + @@ -175,6 +182,7 @@ limitations under the License. 0 1 0 0 1 0 0 0 + 0 0 1 0 diff --git a/test/regression/db.zip b/test/regression/db.zip index ee68fc8cd..3808ded59 100644 Binary files a/test/regression/db.zip and b/test/regression/db.zip differ