diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2023-02-14 11:40:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-14 11:40:32 -0800 |
commit | ba7a3339697a906119520e23064dac2d7a5f31ff (patch) | |
tree | 0cf27027eb36956c6a0e39102ea42588c127bcdd /indra/newview/lltinygltfhelper.cpp | |
parent | 1b19b7cdc9e3d7560c3bd952d81076aee5ae13c2 (diff) | |
parent | d2a2541de598f8d85dba28e88f0b44ccdcdd6ba6 (diff) |
Merge pull request #73 from secondlife/SL-19080
SL-19080: GLTF Material asset consistency: Part 2: Update viewer GLTF Material asset upload to v1.1
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; } |