diff options
| author | Dave Parks <davep@lindenlab.com> | 2022-10-19 17:23:54 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2022-10-19 17:23:54 -0500 |
| commit | 8741c05cc10d3f39f272bb4739e7313309539d07 (patch) | |
| tree | 871d2340a7e22cce1504948a79a703811a084d5a /indra/llprimitive/llgltfmaterial.cpp | |
| parent | de4c018499ddaebbe466fb5a8938554a2d4a3b19 (diff) | |
SL-18105 Hook up TE override material to render pipe by way of render material.
Diffstat (limited to 'indra/llprimitive/llgltfmaterial.cpp')
| -rw-r--r-- | indra/llprimitive/llgltfmaterial.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/llprimitive/llgltfmaterial.cpp b/indra/llprimitive/llgltfmaterial.cpp index 19081cd76f..b9ef2de61a 100644 --- a/indra/llprimitive/llgltfmaterial.cpp +++ b/indra/llprimitive/llgltfmaterial.cpp @@ -446,3 +446,28 @@ void LLGLTFMaterial::writeOverridesToModel(tinygltf::Model& model, S32 mat_index material_out.doubleSided = mDoubleSided; } } + +void LLGLTFMaterial::applyOverride(const LLGLTFMaterial& override_mat) +{ + if (override_mat.mBaseColorId != getDefaultBaseColorId()) + { + mBaseColorId = override_mat.mBaseColorId; + } + + if (override_mat.mNormalId != getDefaultNormalId()) + { + mNormalId = override_mat.mNormalId; + } + + if (override_mat.mMetallicRoughnessId != getDefaultMetallicRoughnessId()) + { + mMetallicRoughnessId = override_mat.mMetallicRoughnessId; + } + + if (override_mat.mEmissiveId != getDefaultEmissiveId()) + { + mEmissiveId = override_mat.mEmissiveId; + } + + //TODO -- implement non texture parameters +} |
