just a try, i dunno have a clue ...

This commit is contained in:
Kim Kulling
2019-11-16 15:51:26 +01:00
parent 2eed8b1820
commit 17257cd2ae
4 changed files with 15 additions and 12 deletions

View File

@@ -200,6 +200,9 @@ inline void SetMaterialTextureProperty(std::vector<int> &embeddedTexIdxs, Asset
uri.length = 1 + ASSIMP_itoa10(uri.data + 1, MAXLEN - 1, texIdx);
}
mat->AddProperty(&uri, AI_MATKEY_TEXTURE(texType, texSlot));
mat->AddProperty(&prop.texCoord, 1, _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE, texType, texSlot);
if (prop.textureTransformSupported) {
aiUVTransform transform;
transform.mTranslation.x = prop.TextureTransformExt_t.offset[0];
@@ -210,9 +213,6 @@ inline void SetMaterialTextureProperty(std::vector<int> &embeddedTexIdxs, Asset
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);
if (prop.texture->sampler) {
Ref<Sampler> sampler = prop.texture->sampler;