Merge pull request #309 from rob100/feature

Added alpha texture map to object exporter
pull/313/head
Alexander Gessler 2014-07-09 16:28:29 +02:00
commit 7648ca21c9
1 changed files with 3 additions and 0 deletions

View File

@ -182,6 +182,9 @@ void ObjExporter::WriteMaterialFile()
if(AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_SHININESS(0),s)) {
mOutputMat << "map_ns " << s.data << endl;
}
if(AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_OPACITY(0),s)) {
mOutputMat << "map_d " << s.data << endl;
}
if(AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_HEIGHT(0),s) || AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_NORMALS(0),s)) {
// implementations seem to vary here, so write both variants
mOutputMat << "bump " << s.data << endl;