glTF: Read and write transparency values

This commit is contained in:
John Senneker
2016-09-29 17:44:04 -04:00
parent 38cbdcd885
commit 83c0163ec6
3 changed files with 6 additions and 0 deletions

View File

@@ -274,6 +274,8 @@ void glTFExporter::ExportMaterials()
GetMatColorOrTex(mat, m->specular, AI_MATKEY_COLOR_SPECULAR, aiTextureType_SPECULAR);
GetMatColorOrTex(mat, m->emission, AI_MATKEY_COLOR_EMISSIVE, aiTextureType_EMISSIVE);
m->transparent = mat->Get(AI_MATKEY_OPACITY, m->transparency) == aiReturn_SUCCESS && m->transparency != 1.0;
GetMatScalar(mat, m->shininess, AI_MATKEY_SHININESS);
}
}