Dont alphamask the bodies of visually muted avatars.
This commit is contained in:
@@ -4059,6 +4059,7 @@ void LLVOAvatar::slamPosition()
|
|||||||
|
|
||||||
bool LLVOAvatar::isVisuallyMuted()
|
bool LLVOAvatar::isVisuallyMuted()
|
||||||
{
|
{
|
||||||
|
if(isSelf())return false;
|
||||||
static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit");
|
static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit");
|
||||||
static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit");
|
static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit");
|
||||||
|
|
||||||
@@ -4917,8 +4918,8 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
|
|||||||
|
|
||||||
if (pass == AVATAR_RENDER_PASS_SINGLE)
|
if (pass == AVATAR_RENDER_PASS_SINGLE)
|
||||||
{
|
{
|
||||||
|
bool is_muted = isVisuallyMuted(); //Disable masking and also disable alpha in LLViewerJoint::render
|
||||||
const bool should_alpha_mask = shouldAlphaMask();
|
const bool should_alpha_mask = !is_muted && shouldAlphaMask();
|
||||||
LLGLState test(GL_ALPHA_TEST, should_alpha_mask);
|
LLGLState test(GL_ALPHA_TEST, should_alpha_mask);
|
||||||
|
|
||||||
if (should_alpha_mask && !LLGLSLShader::sNoFixedFunction)
|
if (should_alpha_mask && !LLGLSLShader::sNoFixedFunction)
|
||||||
@@ -4933,19 +4934,19 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
|
|||||||
{
|
{
|
||||||
if (isTextureVisible(TEX_HEAD_BAKED) || mIsDummy)
|
if (isTextureVisible(TEX_HEAD_BAKED) || mIsDummy)
|
||||||
{
|
{
|
||||||
num_indices += mMeshLOD[MESH_ID_HEAD]->render(mAdjustedPixelArea, TRUE, mIsDummy);
|
num_indices += mMeshLOD[MESH_ID_HEAD]->render(mAdjustedPixelArea, TRUE, mIsDummy || is_muted);
|
||||||
first_pass = FALSE;
|
first_pass = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isTextureVisible(TEX_UPPER_BAKED) || mIsDummy)
|
if (isTextureVisible(TEX_UPPER_BAKED) || mIsDummy)
|
||||||
{
|
{
|
||||||
num_indices += mMeshLOD[MESH_ID_UPPER_BODY]->render(mAdjustedPixelArea, first_pass, mIsDummy);
|
num_indices += mMeshLOD[MESH_ID_UPPER_BODY]->render(mAdjustedPixelArea, first_pass, mIsDummy || is_muted);
|
||||||
first_pass = FALSE;
|
first_pass = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isTextureVisible(TEX_LOWER_BAKED) || mIsDummy)
|
if (isTextureVisible(TEX_LOWER_BAKED) || mIsDummy)
|
||||||
{
|
{
|
||||||
num_indices += mMeshLOD[MESH_ID_LOWER_BODY]->render(mAdjustedPixelArea, first_pass, mIsDummy);
|
num_indices += mMeshLOD[MESH_ID_LOWER_BODY]->render(mAdjustedPixelArea, first_pass, mIsDummy || is_muted);
|
||||||
first_pass = FALSE;
|
first_pass = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user