Merge pull request #2083 from eddiejames/master
Fix .obj displacement texture parsingpull/2086/head^2
commit
2d269ef83f
|
@ -332,6 +332,11 @@ void ObjFileMtlImporter::getTexture() {
|
||||||
// Specular texture
|
// Specular texture
|
||||||
out = & m_pModel->m_pCurrentMaterial->textureSpecular;
|
out = & m_pModel->m_pCurrentMaterial->textureSpecular;
|
||||||
clampIndex = ObjFile::Material::TextureSpecularType;
|
clampIndex = ObjFile::Material::TextureSpecularType;
|
||||||
|
} else if ( !ASSIMP_strincmp( pPtr, DisplacementTexture1.c_str(), static_cast<unsigned int>(DisplacementTexture1.size()) ) ||
|
||||||
|
!ASSIMP_strincmp( pPtr, DisplacementTexture2.c_str(), static_cast<unsigned int>(DisplacementTexture2.size()) ) ) {
|
||||||
|
// Displacement texture
|
||||||
|
out = &m_pModel->m_pCurrentMaterial->textureDisp;
|
||||||
|
clampIndex = ObjFile::Material::TextureDispType;
|
||||||
} else if ( !ASSIMP_strincmp( pPtr, OpacityTexture.c_str(), static_cast<unsigned int>(OpacityTexture.size()) ) ) {
|
} else if ( !ASSIMP_strincmp( pPtr, OpacityTexture.c_str(), static_cast<unsigned int>(OpacityTexture.size()) ) ) {
|
||||||
// Opacity texture
|
// Opacity texture
|
||||||
out = & m_pModel->m_pCurrentMaterial->textureOpacity;
|
out = & m_pModel->m_pCurrentMaterial->textureOpacity;
|
||||||
|
@ -354,11 +359,6 @@ void ObjFileMtlImporter::getTexture() {
|
||||||
// Reflection texture(s)
|
// Reflection texture(s)
|
||||||
//Do nothing here
|
//Do nothing here
|
||||||
return;
|
return;
|
||||||
} else if ( !ASSIMP_strincmp( pPtr, DisplacementTexture1.c_str(), static_cast<unsigned int>(DisplacementTexture1.size()) ) ||
|
|
||||||
!ASSIMP_strincmp( pPtr, DisplacementTexture2.c_str(), static_cast<unsigned int>(DisplacementTexture2.size()) ) ) {
|
|
||||||
// Displacement texture
|
|
||||||
out = &m_pModel->m_pCurrentMaterial->textureDisp;
|
|
||||||
clampIndex = ObjFile::Material::TextureDispType;
|
|
||||||
} else if ( !ASSIMP_strincmp( pPtr, SpecularityTexture.c_str(), static_cast<unsigned int>(SpecularityTexture.size()) ) ) {
|
} else if ( !ASSIMP_strincmp( pPtr, SpecularityTexture.c_str(), static_cast<unsigned int>(SpecularityTexture.size()) ) ) {
|
||||||
// Specularity scaling (glossiness)
|
// Specularity scaling (glossiness)
|
||||||
out = & m_pModel->m_pCurrentMaterial->textureSpecularity;
|
out = & m_pModel->m_pCurrentMaterial->textureSpecularity;
|
||||||
|
|
Loading…
Reference in New Issue