Merge remote-tracking branch 'shyotl/master'
This commit is contained in:
@@ -218,7 +218,7 @@
|
||||
<key>Value</key>
|
||||
<real>1</real>
|
||||
</map>
|
||||
<key>SHAlphaMaskMaxRMSE</key>
|
||||
<key>SHAutoMaskMaxRMSE</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Sets the maximum random mean square error cutoff used when detecting suitable textures for alphamasking. (SHUseRMSEAutoMask must be TRUE for this to have any effect)</string>
|
||||
|
||||
@@ -1068,10 +1068,10 @@ bool LLFace::canRenderAsMask()
|
||||
const LLTextureEntry* te = getTextureEntry();
|
||||
|
||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
||||
static const LLCachedControl<F32> alpha_mas_max_rmse("SHAlphaMaskMaxRMSE",.09f);
|
||||
static const LLCachedControl<F32> auto_mask_max_rmse("SHAutoMaskMaxRMSE",.09f);
|
||||
if ((te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha
|
||||
(te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask
|
||||
getTexture()->getIsAlphaMask(use_rmse_auto_mask ? alpha_mas_max_rmse : -1.f)) // texture actually qualifies for masking (lazily recalculated but expensive)
|
||||
(!getViewerObject()->isAttachment() && getTexture()->getIsAlphaMask(use_rmse_auto_mask ? auto_mask_max_rmse : -1.f))) // texture actually qualifies for masking (lazily recalculated but expensive)
|
||||
{
|
||||
if (LLPipeline::sRenderDeferred)
|
||||
{
|
||||
|
||||
@@ -283,8 +283,8 @@ void LLPreviewTexture::draw()
|
||||
mImage);
|
||||
|
||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
||||
static const LLCachedControl<F32> alpha_mas_max_rmse("SHAlphaMaskMaxRMSE",.09f);
|
||||
if (mAlphaMaskResult != mImage->getIsAlphaMask(use_rmse_auto_mask ? alpha_mas_max_rmse : -1.f))
|
||||
static const LLCachedControl<F32> auto_mask_max_rmse("SHAutoMaskMaxRMSE",.09f);
|
||||
if (mAlphaMaskResult != mImage->getIsAlphaMask(use_rmse_auto_mask ? auto_mask_max_rmse : -1.f))
|
||||
{
|
||||
mAlphaMaskResult = !mAlphaMaskResult;
|
||||
if (!mAlphaMaskResult)
|
||||
|
||||
@@ -675,7 +675,7 @@ void settings_setup_listeners()
|
||||
gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("SHUseRMSEAutoMask")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("SHAlphaMaskMaxRMSE")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("SHAutoMaskMaxRMSE")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
//See LL jira VWR-3258 comment section. Implemented by LL in 2.1 -Shyotl
|
||||
|
||||
@@ -123,7 +123,7 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
|
||||
if( ! mediaUrl.empty() && gSavedSettings.getWarning("FirstStreamingVideo") )
|
||||
{
|
||||
LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(),
|
||||
boost::bind(callback_play_media, _1, _2, parcel));
|
||||
boost::bind(&callback_play_media, _1, _2, parcel));
|
||||
return;
|
||||
|
||||
}
|
||||
@@ -903,35 +903,43 @@ void callback_media_alert(const LLSD ¬ification, const LLSD &response, LLParc
|
||||
LLViewerParcelMedia::playStreamingMusic(parcel, false);
|
||||
}
|
||||
}
|
||||
else if (option == 1 || option == 2) // Deny or Blacklist
|
||||
else
|
||||
{
|
||||
LLViewerParcelMedia::sDeniedMedia.insert(domain);
|
||||
if (ip != domain && domain.find('/') == std::string::npos)
|
||||
{
|
||||
LLViewerParcelMedia::sDeniedMedia.insert(ip);
|
||||
}
|
||||
if (type == 1)
|
||||
{
|
||||
LLViewerParcelMedia::stopStreamingMusic();
|
||||
}
|
||||
if (option == 1) // Deny
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("MediaBlocked", args);
|
||||
LLViewerParcelMedia::stopStreamingMusic();
|
||||
}
|
||||
else // Blacklist
|
||||
if (option == 1 || option == 2) // Deny or Blacklist
|
||||
{
|
||||
LLSD newmedia;
|
||||
newmedia["domain"] = domain;
|
||||
newmedia["action"] = "deny";
|
||||
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
||||
LLViewerParcelMedia::sDeniedMedia.insert(domain);
|
||||
if (ip != domain && domain.find('/') == std::string::npos)
|
||||
{
|
||||
newmedia["domain"] = ip;
|
||||
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
||||
LLViewerParcelMedia::sDeniedMedia.insert(ip);
|
||||
}
|
||||
|
||||
if (option == 1) // Deny
|
||||
{
|
||||
LLNotificationsUtil::add("MediaBlocked", args);
|
||||
}
|
||||
else // Blacklist
|
||||
{
|
||||
LLSD newmedia;
|
||||
newmedia["domain"] = domain;
|
||||
newmedia["action"] = "deny";
|
||||
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
||||
if (ip != domain && domain.find('/') == std::string::npos)
|
||||
{
|
||||
newmedia["domain"] = ip;
|
||||
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
||||
}
|
||||
LLViewerParcelMedia::saveDomainFilterList();
|
||||
args["LISTED"] = "blacklisted";
|
||||
LLNotificationsUtil::add("MediaListed", args);
|
||||
}
|
||||
LLViewerParcelMedia::saveDomainFilterList();
|
||||
args["LISTED"] = "blacklisted";
|
||||
LLNotificationsUtil::add("MediaListed", args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -370,8 +370,8 @@ public:
|
||||
}
|
||||
}
|
||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
||||
static const LLCachedControl<F32> alpha_mas_max_rmse("SHAlphaMaskMaxRMSE",.09f);
|
||||
addText(xpos, ypos, llformat("Mask: %s", imagep->getIsAlphaMask(use_rmse_auto_mask ? alpha_mas_max_rmse : -1.f) ? "TRUE":"FALSE")); ypos += y_inc;
|
||||
static const LLCachedControl<F32> auto_mask_max_rmse("SHAutoMaskMaxRMSE",.09f);
|
||||
addText(xpos, ypos, llformat("Mask: %s", imagep->getIsAlphaMask(use_rmse_auto_mask ? auto_mask_max_rmse : -1.f) ? "TRUE":"FALSE")); ypos += y_inc;
|
||||
addText(xpos, ypos, llformat("ID: %s", imagep->getID().asString())); ypos += y_inc;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user