From b30cde2a05c5217018d8be7608f14bda8b66127a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 21 Mar 2023 21:31:18 +0200 Subject: SL-19392 Disable "Double Sided" by default when importing double sided materials --- indra/newview/llmaterialeditor.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 4cdc503af8..609d8ea5d7 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -2045,6 +2045,15 @@ void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std:: setFromGltfMetaData(filename, model_in, index); + if (getDoubleSided()) + { + // SL-19392 Double sided materials double the number of pixels that must be rasterized, + // and a great many tools that export GLTF simply leave double sided enabled whether + // or not it is necessary. + LL_DEBUGS("MaterialEditor") << "Defaulting Double Sided to disabled on import" << LL_ENDL; + setDoubleSided(false); + } + markChangesUnsaved(U32_MAX); if (open_floater) -- cgit v1.2.3