|
@@ -193,9 +193,16 @@ void glTFImporter::ImportMaterials(glTF::Asset& r)
|
|
aimat->AddProperty(&str, AI_MATKEY_NAME);
|
|
aimat->AddProperty(&str, AI_MATKEY_NAME);
|
|
}
|
|
}
|
|
|
|
|
|
- SetMaterialColorProperty(embeddedTexIdxs, r, mat.diffuse, aimat, aiTextureType_DIFFUSE, AI_MATKEY_COLOR_DIFFUSE);
|
|
|
|
|
|
+ SetMaterialColorProperty(embeddedTexIdxs, r, mat.ambient, aimat, aiTextureType_AMBIENT, AI_MATKEY_COLOR_AMBIENT );
|
|
|
|
+ SetMaterialColorProperty(embeddedTexIdxs, r, mat.diffuse, aimat, aiTextureType_DIFFUSE, AI_MATKEY_COLOR_DIFFUSE );
|
|
SetMaterialColorProperty(embeddedTexIdxs, r, mat.specular, aimat, aiTextureType_SPECULAR, AI_MATKEY_COLOR_SPECULAR);
|
|
SetMaterialColorProperty(embeddedTexIdxs, r, mat.specular, aimat, aiTextureType_SPECULAR, AI_MATKEY_COLOR_SPECULAR);
|
|
- SetMaterialColorProperty(embeddedTexIdxs, r, mat.ambient, aimat, aiTextureType_AMBIENT, AI_MATKEY_COLOR_AMBIENT);
|
|
|
|
|
|
+ SetMaterialColorProperty(embeddedTexIdxs, r, mat.emission, aimat, aiTextureType_EMISSIVE, AI_MATKEY_COLOR_EMISSIVE);
|
|
|
|
+
|
|
|
|
+ aimat->AddProperty(&mat.doubleSided, 1, AI_MATKEY_TWOSIDED);
|
|
|
|
+
|
|
|
|
+ if (mat.transparent && (mat.transparency != 1.0f)) {
|
|
|
|
+ aimat->AddProperty(&mat.transparency, 1, AI_MATKEY_OPACITY);
|
|
|
|
+ }
|
|
|
|
|
|
if (mat.shininess > 0.f) {
|
|
if (mat.shininess > 0.f) {
|
|
aimat->AddProperty(&mat.shininess, 1, AI_MATKEY_SHININESS);
|
|
aimat->AddProperty(&mat.shininess, 1, AI_MATKEY_SHININESS);
|