diff options
| author | Cosmic Linden <cosmic@lindenlab.com> | 2023-02-09 15:04:46 -0800 |
|---|---|---|
| committer | Cosmic Linden <cosmic@lindenlab.com> | 2023-02-09 15:05:19 -0800 |
| commit | d6841c07983a46ff805ed23a7318efbf9cca3b24 (patch) | |
| tree | c6b8432f722f939f1ed088681bcb2dada1bf5587 /indra/newview/lltinygltfhelper.cpp | |
| parent | 627e3d51c61778e07e350689ce68ede24afe61ab (diff) | |
SL-19080: Update GLTF Material asset upload to v1.1, with stricter GLTF compliance and removal of unsupported features
Diffstat (limited to 'indra/newview/lltinygltfhelper.cpp')
| -rw-r--r-- | indra/newview/lltinygltfhelper.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/lltinygltfhelper.cpp b/indra/newview/lltinygltfhelper.cpp index 611911014a..1a8e868d11 100644 --- a/indra/newview/lltinygltfhelper.cpp +++ b/indra/newview/lltinygltfhelper.cpp @@ -309,48 +309,48 @@ bool LLTinyGLTFHelper::getMaterialFromFile( if (base_color_tex) { base_color_tex->addTextureStats(64.f * 64.f, TRUE); - material->mBaseColorId = base_color_tex->getID(); + material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR] = base_color_tex->getID(); material->mBaseColorTexture = base_color_tex; } else { - material->mBaseColorId = LLUUID::null; + material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR] = LLUUID::null; material->mBaseColorTexture = nullptr; } if (normal_tex) { normal_tex->addTextureStats(64.f * 64.f, TRUE); - material->mNormalId = normal_tex->getID(); + material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL] = normal_tex->getID(); material->mNormalTexture = normal_tex; } else { - material->mNormalId = LLUUID::null; + material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL] = LLUUID::null; material->mNormalTexture = nullptr; } if (mr_tex) { mr_tex->addTextureStats(64.f * 64.f, TRUE); - material->mMetallicRoughnessId = mr_tex->getID(); + material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS] = mr_tex->getID(); material->mMetallicRoughnessTexture = mr_tex; } else { - material->mMetallicRoughnessId = LLUUID::null; + material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS] = LLUUID::null; material->mMetallicRoughnessTexture = nullptr; } if (emissive_tex) { emissive_tex->addTextureStats(64.f * 64.f, TRUE); - material->mEmissiveId = emissive_tex->getID(); + material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE] = emissive_tex->getID(); material->mEmissiveTexture = emissive_tex; } else { - material->mEmissiveId = LLUUID::null; + material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE] = LLUUID::null; material->mEmissiveTexture = nullptr; } |
