RMSE bugfixes.

This commit is contained in:
Shyotl
2017-04-01 21:55:13 -05:00
parent 1230748ef5
commit b24635d24e
3 changed files with 3 additions and 3 deletions

View File

@@ -2203,7 +2203,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
mIsMask = TRUE;
}
mMaskMidPercentile = (F32)mids / (F32)length;
mMaskMidPercentile = (F32)mids / (F32)(w * h);
mMaskRMSE = ((max-min)%255)==0 ? sqrt(sum)/255.0 : FLT_MAX;
/*std::list<std::pair<std::string,std::string> > &data = sTextureMaskMap[getTexName()];

View File

@@ -216,7 +216,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.2</real>
<real>0.18</real>
</map>
<key>SHAutoMaskMaxMid</key>
<map>

View File

@@ -351,7 +351,7 @@ public:
if(obj)
{
S32 te = nodep ? nodep->getLastSelectedTE() : -1;
if(te > 0)
if(te >= 0)
{
LLViewerTexture* imagep = obj->getTEImage(te);
if(imagep && imagep != (LLViewerTexture*)LLViewerFetchedTexture::sDefaultImagep.get())