add missing setup of texture transform in aiMaterial.

This commit is contained in:
Kim Kulling
2019-11-15 18:35:33 +01:00
parent 74080a083a
commit 17946e26ef
2 changed files with 18 additions and 2 deletions
+8
View File
@@ -206,6 +206,14 @@ inline void SetMaterialTextureProperty(std::vector<int>& embeddedTexIdxs, Asset&
uri.length = 1 + ASSIMP_itoa10(uri.data + 1, MAXLEN - 1, texIdx);
}
aiUVTransform transform;
transform.mTranslation.x = prop.offset[0];
transform.mTranslation.y = prop.offset[0];
transform.mRotation = prop.rotation;
transform.mScaling.x = prop.scale[0];
transform.mScaling.y = prop.scale[1];
mat->AddProperty(&transform, 1, _AI_MATKEY_UVTRANSFORM_BASE, texType, texSlot);
mat->AddProperty(&uri, AI_MATKEY_TEXTURE(texType, texSlot));
mat->AddProperty(&prop.texCoord, 1, _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE, texType, texSlot);