Skip to content

Commit

Permalink
Merge pull request assimp#5212 from guguTang/xin-issue_5211
Browse files Browse the repository at this point in the history
Ensure that the strength attribute is the same when importing or exporting gltf2
  • Loading branch information
kimkulling authored Aug 24, 2023
2 parents c953c9b + 60b6d80 commit fe6730f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/AssetLib/glTF2/glTF2Importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ inline void SetMaterialTextureProperty(std::vector<int> &embeddedTexIdxs, Asset
SetMaterialTextureProperty(embeddedTexIdxs, r, (glTF2::TextureInfo)prop, mat, texType, texSlot);

if (prop.texture && prop.texture->source) {
mat->AddProperty(&prop.strength, 1, AI_MATKEY_GLTF_TEXTURE_STRENGTH(texType, texSlot));
std::string textureStrengthKey = std::string(_AI_MATKEY_TEXTURE_BASE) + "." + "strength";
mat->AddProperty(&prop.strength, 1, textureStrengthKey.c_str(), texType, texSlot);
}
}

Expand Down

0 comments on commit fe6730f

Please sign in to comment.