Renamed SHAlphaMaskMaxRMSE to SHAutoMaskMaxRMSE. Disabled alpha masking on attachments.
This commit is contained in:
@@ -218,7 +218,7 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<real>1</real>
|
<real>1</real>
|
||||||
</map>
|
</map>
|
||||||
<key>SHAlphaMaskMaxRMSE</key>
|
<key>SHAutoMaskMaxRMSE</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<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>
|
<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();
|
const LLTextureEntry* te = getTextureEntry();
|
||||||
|
|
||||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
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
|
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
|
(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)
|
if (LLPipeline::sRenderDeferred)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -283,8 +283,8 @@ void LLPreviewTexture::draw()
|
|||||||
mImage);
|
mImage);
|
||||||
|
|
||||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
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 (mAlphaMaskResult != mImage->getIsAlphaMask(use_rmse_auto_mask ? alpha_mas_max_rmse : -1.f))
|
if (mAlphaMaskResult != mImage->getIsAlphaMask(use_rmse_auto_mask ? auto_mask_max_rmse : -1.f))
|
||||||
{
|
{
|
||||||
mAlphaMaskResult = !mAlphaMaskResult;
|
mAlphaMaskResult = !mAlphaMaskResult;
|
||||||
if (!mAlphaMaskResult)
|
if (!mAlphaMaskResult)
|
||||||
|
|||||||
@@ -675,7 +675,7 @@ void settings_setup_listeners()
|
|||||||
gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||||
gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->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("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("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||||
gSavedSettings.getControl("RenderMaxVBOSize")->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
|
//See LL jira VWR-3258 comment section. Implemented by LL in 2.1 -Shyotl
|
||||||
|
|||||||
@@ -370,8 +370,8 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
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);
|
||||||
addText(xpos, ypos, llformat("Mask: %s", imagep->getIsAlphaMask(use_rmse_auto_mask ? alpha_mas_max_rmse : -1.f) ? "TRUE":"FALSE")); ypos += y_inc;
|
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;
|
addText(xpos, ypos, llformat("ID: %s", imagep->getID().asString())); ypos += y_inc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user