diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-04-21 15:37:25 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-04-21 15:37:25 +0300 |
commit | 4cf42435733a111610a13620c56728b1b659b1e9 (patch) | |
tree | 5ac5ac10070448dcfdf38bf36e23ea9b6b766f95 /indra/llappearance/llpolymorph.cpp | |
parent | dcb6b5489d2c3cfdb13d5862f8cb29fee06745a7 (diff) | |
parent | d7f1c88c35849e56f5b352f13c16a08467d1533b (diff) |
Merge branch 'master' into DRTVWR-483
# Conflicts:
# indra/newview/CMakeLists.txt
# indra/newview/llviewerfloaterreg.cpp
# indra/newview/skins/default/xui/de/floater_preview_texture.xml
# indra/newview/skins/default/xui/es/floater_preview_texture.xml
# indra/newview/skins/default/xui/fr/floater_preview_texture.xml
# indra/newview/skins/default/xui/it/floater_preview_texture.xml
# indra/newview/skins/default/xui/ja/panel_edit_classified.xml
# indra/newview/skins/default/xui/ja/panel_me.xml
# indra/newview/skins/default/xui/ru/floater_preview_texture.xml
# indra/newview/skins/default/xui/tr/floater_picks.xml
# indra/newview/skins/default/xui/tr/floater_preview_texture.xml
# indra/newview/skins/default/xui/tr/panel_edit_classified.xml
# indra/newview/skins/default/xui/tr/panel_me.xml
# indra/newview/skins/default/xui/zh/floater_preview_texture.xml
Diffstat (limited to 'indra/llappearance/llpolymorph.cpp')
-rw-r--r-- | indra/llappearance/llpolymorph.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 2cb4c65d7c..ce7010984a 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -816,8 +816,8 @@ void LLPolyVertexMask::generateMask(U8 *maskTextureData, S32 width, S32 height, U32 s = llclamp((U32)(uvCoords.mV[VX] * (F32)(width - 1)), (U32)0, (U32)width - 1); U32 t = llclamp((U32)(uvCoords.mV[VY] * (F32)(height - 1)), (U32)0, (U32)height - 1); - mWeights[index] = ((F32) maskTextureData[((t * width + s) * num_components) + (num_components - 1)]) / 255.f; - + mWeights[index] = maskTextureData ? ((F32) maskTextureData[((t * width + s) * num_components) + (num_components - 1)]) / 255.f : 0.0f; + if (invert) { mWeights[index] = 1.f - mWeights[index]; |