summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-09-15 17:23:34 -0500
committerDave Parks <davep@lindenlab.com>2022-09-15 17:23:34 -0500
commit82ab5f9765ad76c73d1d7ddd5716b22d6b92bf62 (patch)
tree80008bf0bfa44df1d962c5d030c0a7be787ce2fb /indra/newview
parente61b6570b15e5d7843712ea65e11c3df42bf4f81 (diff)
SL-18156 WIP -- Add NormalizedScale/NormalizedTranslation to mesh assets to recover mesh's original coordinate frame when generating tangents post download.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llmodelpreview.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index 2c0f0ae443..4a85d459c5 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -1843,6 +1843,15 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
LLModel* target_model = mModel[lod][mdl_idx];
+ // carry over normalized transform into simplified model
+ for (int i = 0; i < base->getNumVolumeFaces(); ++i)
+ {
+ LLVolumeFace& src = base->getVolumeFace(i);
+ LLVolumeFace& dst = target_model->getVolumeFace(i);
+ dst.mNormalizedScale = src.mNormalizedScale;
+ dst.mNormalizedTranslation = src.mNormalizedTranslation;
+ }
+
S32 model_meshopt_mode = meshopt_mode;
// Ideally this should run not per model,