diff options
-rw-r--r-- | indra/newview/llgltfmateriallist.cpp | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_material_editor.xml | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_tools.xml | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 7ecbc6eeac..96c29d7ed2 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -99,13 +99,13 @@ static void set_from_model(LLGLTFMaterial* mat, tinygltf::Model& model) } mat->setAlphaMode(material_in.alphaMode); - mat->mAlphaCutoff = material_in.alphaCutoff; + mat->mAlphaCutoff = llclamp((F32)material_in.alphaCutoff, 0.f, 1.f); mat->mAlbedoColor = get_color(material_in.pbrMetallicRoughness.baseColorFactor); mat->mEmissiveColor = get_color(material_in.emissiveFactor); - mat->mMetallicFactor = material_in.pbrMetallicRoughness.metallicFactor; - mat->mRoughnessFactor = material_in.pbrMetallicRoughness.roughnessFactor; + mat->mMetallicFactor = llclamp((F32)material_in.pbrMetallicRoughness.metallicFactor, 0.f, 1.f); + mat->mRoughnessFactor = llclamp((F32)material_in.pbrMetallicRoughness.roughnessFactor, 0.f, 1.f); mat->mDoubleSided = material_in.doubleSided; } diff --git a/indra/newview/skins/default/xui/en/floater_material_editor.xml b/indra/newview/skins/default/xui/en/floater_material_editor.xml index 74adc86126..0a05a4f868 100644 --- a/indra/newview/skins/default/xui/en/floater_material_editor.xml +++ b/indra/newview/skins/default/xui/en/floater_material_editor.xml @@ -111,6 +111,7 @@ layout="topleft" left_delta="0" top_pad="5" + min_val="0" max_val="1" name="transparency" width="64" @@ -169,6 +170,7 @@ layout="topleft" left_delta="0" top_pad="5" + min_val="0" max_val="1" name="alpha cutoff" width="64" @@ -245,6 +247,7 @@ layout="topleft" left_delta="0" top_pad="5" + min_val="0" max_val="1" name="metalness factor" width="64" @@ -270,7 +273,7 @@ layout="topleft" left_delta="0" top_pad="5" - + min_val="0" max_val="1" name="roughness factor" width="64" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 8f2acc8df4..4700488197 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -820,7 +820,7 @@ width="282"/> <tab_container follows="left|top" - height="471" + height="476" halign="center" left="0" name="Object Info Tabs" @@ -2749,7 +2749,7 @@ even though the user gets a free copy. border_visible="true" bevel_style="in" follows="left|top|right" - height="335" + height="387" layout="topleft" left="10" name="contents_inventory" |