Skip to content
Snippets Groups Projects
Commit 73d70b5d authored by David Parks's avatar David Parks
Browse files

SH-2240 Make alpha mask cutoff a little less aggressive (err on the side of...

SH-2240 Make alpha mask cutoff a little less aggressive (err on the side of not creating an alpha mask)
parent ae17efe7
No related branches found
No related tags found
No related merge requests found
...@@ -1853,7 +1853,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h) ...@@ -1853,7 +1853,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
upperhalftotal += sample[i]; upperhalftotal += sample[i];
} }
if (midrangetotal > length/16 || // lots of midrange, or if (midrangetotal > length/48 || // lots of midrange, or
(lowerhalftotal == length && alphatotal != 0) || // all close to transparent but not all totally transparent, or (lowerhalftotal == length && alphatotal != 0) || // all close to transparent but not all totally transparent, or
(upperhalftotal == length && alphatotal != 255*length)) // all close to opaque but not all totally opaque (upperhalftotal == length && alphatotal != 255*length)) // all close to opaque but not all totally opaque
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment