summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autobuild.xml4
-rwxr-xr-xdoc/contributions.txt2
-rw-r--r--indra/llappearance/llavatarappearance.cpp87
-rw-r--r--indra/llappearance/llavatarappearance.h2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl11
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl30
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl4
-rw-r--r--indra/newview/llagentbenefits.cpp2
-rw-r--r--indra/newview/llheroprobemanager.cpp40
-rw-r--r--indra/newview/llheroprobemanager.h3
-rw-r--r--indra/newview/llmaterialeditor.cpp60
-rw-r--r--indra/newview/llmaterialeditor.h1
-rw-r--r--indra/newview/llpanelvolume.cpp6
-rw-r--r--indra/newview/llviewerdisplay.cpp3
14 files changed, 146 insertions, 109 deletions
diff --git a/autobuild.xml b/autobuild.xml
index 16413f92a3..c4f0528d7c 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -2887,11 +2887,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>9e0092c6a3aed1cb40a9e26df689c42c68142c9d</string>
+ <string>8278a2368136cb12319ca00e7aceb2829bf3ebd8</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-tinyexr/releases/download/v1.0.8-r1/tinyexr-v1.0.8-common-8755737750.tar.zst</string>
+ <string>https://github.com/secondlife/3p-tinyexr/releases/download/v1.0.8-ba4bc64/tinyexr-v1.0.8-common-9373975608.tar.zst</string>
</map>
<key>name</key>
<string>common</string>
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 8df7543860..024ca90d2f 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -246,7 +246,7 @@ Ansariel Hiller
SL-4126
SL-20224
SL-20524
- https://github.com/secondlife/viewer/issues/1051
+ secondlife/viewer#1051
Aralara Rajal
Arare Chantilly
CHUIBUG-191
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index f06845f084..3ac5714288 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -494,45 +494,70 @@ void LLAvatarAppearance::computeBodySize()
mCurrBodySizeState["mAnkleLeft scale"] = mAnkleLeftp->getScale();
mCurrBodySizeState["mFootLeft pos"] = mFootLeftp->getPosition();
- F32 old_height = mBodySize.mV[VZ];
+ LLVector3 pelvis_scale = mPelvisp->getScale();
+
+ // some of the joints have not been cached
+ LLVector3 skull = mSkullp->getPosition();
+ //LLVector3 skull_scale = mSkullp->getScale();
+
+ LLVector3 neck = mNeckp->getPosition();
+ LLVector3 neck_scale = mNeckp->getScale();
+
+ LLVector3 chest = mChestp->getPosition();
+ LLVector3 chest_scale = mChestp->getScale();
+
+ // the rest of the joints have been cached
+ LLVector3 head = mHeadp->getPosition();
+ LLVector3 head_scale = mHeadp->getScale();
+
+ LLVector3 torso = mTorsop->getPosition();
+ LLVector3 torso_scale = mTorsop->getScale();
+
+ LLVector3 hip = mHipLeftp->getPosition();
+ LLVector3 hip_scale = mHipLeftp->getScale();
+
+ LLVector3 knee = mKneeLeftp->getPosition();
+ LLVector3 knee_scale = mKneeLeftp->getScale();
+
+ LLVector3 ankle = mAnkleLeftp->getPosition();
+ LLVector3 ankle_scale = mAnkleLeftp->getScale();
+
+ LLVector3 foot = mFootLeftp->getPosition();
+
F32 old_offset = mAvatarOffset.mV[VZ];
- // TODO: Measure the real depth and width
- mPelvisToFoot = computePelvisToFoot();
- F32 new_height = computeBodyHeight();
- mBodySize.set(DEFAULT_AGENT_DEPTH, DEFAULT_AGENT_WIDTH, new_height);
- F32 new_offset = getVisualParamWeight(AVATAR_HOVER);
- mAvatarOffset.set(0, 0, new_offset);
+ mAvatarOffset.mV[VZ] = getVisualParamWeight(AVATAR_HOVER);
+
+ mPelvisToFoot = hip.mV[VZ] * pelvis_scale.mV[VZ] -
+ knee.mV[VZ] * hip_scale.mV[VZ] -
+ ankle.mV[VZ] * knee_scale.mV[VZ] -
+ foot.mV[VZ] * ankle_scale.mV[VZ];
- if (mBodySize.mV[VZ] != old_height || new_offset != old_offset)
+ LLVector3 new_body_size;
+ new_body_size.mV[VZ] = mPelvisToFoot +
+ // the sqrt(2) correction below is an approximate
+ // correction to get to the top of the head
+ F_SQRT2 * (skull.mV[VZ] * head_scale.mV[VZ]) +
+ head.mV[VZ] * neck_scale.mV[VZ] +
+ neck.mV[VZ] * chest_scale.mV[VZ] +
+ chest.mV[VZ] * torso_scale.mV[VZ] +
+ torso.mV[VZ] * pelvis_scale.mV[VZ];
+
+ // TODO -- measure the real depth and width
+ new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH;
+ new_body_size.mV[VY] = DEFAULT_AGENT_WIDTH;
+
+ mAvatarOffset.mV[VX] = 0.0f;
+ mAvatarOffset.mV[VY] = 0.0f;
+
+ if (new_body_size != mBodySize || old_offset != mAvatarOffset.mV[VZ])
{
+ mBodySize = new_body_size;
+
compareJointStateMaps(mLastBodySizeState, mCurrBodySizeState);
}
}
-F32 LLAvatarAppearance::computeBodyHeight()
-{
- F32 result = mPelvisToFoot +
- // all these relative positions usually are positive
- mPelvisp->getScale().mV[VZ] * mTorsop->getPosition().mV[VZ] +
- mTorsop->getScale().mV[VZ] * mChestp->getPosition().mV[VZ] +
- mChestp->getScale().mV[VZ] * mNeckp->getPosition().mV[VZ] +
- mNeckp->getScale().mV[VZ] * mHeadp->getPosition().mV[VZ] +
- mHeadp->getScale().mV[VZ] * mSkullp->getPosition().mV[VZ] * 2;
- return result;
-}
-
-F32 LLAvatarAppearance::computePelvisToFoot()
-{
- F32 result =
- // all these relative positions usually are negative
- mPelvisp->getScale().mV[VZ] * mHipLeftp->getPosition().mV[VZ] +
- mHipLeftp->getScale().mV[VZ] * mKneeLeftp->getPosition().mV[VZ] +
- mKneeLeftp->getScale().mV[VZ] * mAnkleLeftp->getPosition().mV[VZ] +
- mAnkleLeftp->getScale().mV[VZ] * mFootLeftp->getPosition().mV[VZ] / 2;
- return -result;
-}
-
//-----------------------------------------------------------------------------
// parseSkeletonFile()
//-----------------------------------------------------------------------------
diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h
index c2188d8ac9..704552dfe4 100644
--- a/indra/llappearance/llavatarappearance.h
+++ b/indra/llappearance/llavatarappearance.h
@@ -147,8 +147,6 @@ public:
void compareJointStateMaps(joint_state_map_t& last_state,
joint_state_map_t& curr_state);
void computeBodySize();
- F32 computeBodyHeight();
- F32 computePelvisToFoot();
public:
typedef std::vector<LLAvatarJoint*> avatar_joint_list_t;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
index 8b23037934..3ea2248bec 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
@@ -143,17 +143,8 @@ vec2 getScreenCoordinate(vec2 screenpos)
vec4 getNorm(vec2 screenpos)
{
- return texture(normalMap, screenpos.xy);
-}
-
-// return packedNormalEnvIntensityFlags since GBUFFER_FLAG_HAS_PBR needs .w
-// See: C++: addDeferredAttachments(), GLSL: softenLightF
-vec4 getNormalEnvIntensityFlags(vec2 screenpos, out vec3 n, out float envIntensity)
-{
vec4 norm = texture(normalMap, screenpos.xy);
- n = norm.xyz;
- envIntensity = texture(emissiveRect, screenpos.xy).r;
-
+ norm.xyz = normalize(norm.xyz);
return norm;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
index 2efd50a46a..c4c1fc6952 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
@@ -193,7 +193,7 @@ void main()
rm_factors[3] = vec2(roughnessFactors.w, metallicFactors.w);
#endif
- PBRMix mix = init_pbr_mix();
+ PBRMix pbr_mix = init_pbr_mix();
PBRMix mix2;
TerrainCoord terrain_texcoord;
switch (tm.type & MIX_X)
@@ -233,7 +233,7 @@ void main()
#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
mix2.vNt = mikktspace(mix2.vNt, vary_tangents[0]);
#endif
- mix = mix_pbr(mix, mix2, tm.weight.x);
+ pbr_mix = mix_pbr(mix, mix2, tm.weight.x);
break;
default:
break;
@@ -275,7 +275,7 @@ void main()
#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
mix2.vNt = mikktspace(mix2.vNt, vary_tangents[1]);
#endif
- mix = mix_pbr(mix, mix2, tm.weight.y);
+ pbr_mix = mix_pbr(mix, mix2, tm.weight.y);
break;
default:
break;
@@ -317,7 +317,7 @@ void main()
#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
mix2.vNt = mikktspace(mix2.vNt, vary_tangents[2]);
#endif
- mix = mix_pbr(mix, mix2, tm.weight.z);
+ pbr_mix = mix_pbr(mix, mix2, tm.weight.z);
break;
default:
break;
@@ -359,21 +359,21 @@ void main()
#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
mix2.vNt = mikktspace(mix2.vNt, vary_tangents[3]);
#endif
- mix = mix_pbr(mix, mix2, tm.weight.w);
+ pbr_mix = mix_pbr(mix, mix2, tm.weight.w);
break;
default:
break;
}
float minimum_alpha = terrain_mix(tm, minimum_alphas);
- if (mix.col.a < minimum_alpha)
+ if (pbr_mix.col.a < minimum_alpha)
{
discard;
}
float base_color_factor_alpha = terrain_mix(tm, vec4(baseColorFactors[0].z, baseColorFactors[1].z, baseColorFactors[2].z, baseColorFactors[3].z));
#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
- vec3 tnorm = normalize(mix.vNt);
+ vec3 tnorm = normalize(pbr_mix.vNt);
#else
vec3 tnorm = vary_normal;
#endif
@@ -381,21 +381,21 @@ void main()
#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
-#define emissive mix.emissive
+#define mix_emissive pbr_mix.emissive
#else
-#define emissive vec3(0)
+#define mix_emissive vec3(0)
#endif
#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
-#define orm mix.orm
+#define mix_orm pbr_mix.orm
#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
-#define orm vec3(1.0, mix.rm)
+#define mix_orm vec3(1.0, pbr_mix.rm)
#else
// Matte plastic potato terrain
-#define orm vec3(1.0, 1.0, 0.0)
+#define mix_orm vec3(1.0, 1.0, 0.0)
#endif
- frag_data[0] = max(vec4(mix.col.xyz, 0.0), vec4(0)); // Diffuse
- frag_data[1] = max(vec4(orm.rgb, base_color_factor_alpha), vec4(0)); // PBR linear packed Occlusion, Roughness, Metal.
+ frag_data[0] = max(vec4(pbr_mix.col.xyz, 0.0), vec4(0)); // Diffuse
+ frag_data[1] = max(vec4(mix_orm.rgb, base_color_factor_alpha), vec4(0)); // PBR linear packed Occlusion, Roughness, Metal.
frag_data[2] = vec4(tnorm, GBUFFER_FLAG_HAS_PBR); // normal, flags
- frag_data[3] = max(vec4(emissive,0), vec4(0)); // PBR sRGB Emissive
+ frag_data[3] = max(vec4(mix_emissive,0), vec4(0)); // PBR sRGB Emissive
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
index 8e1e4b54d5..b4ab7cd169 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
@@ -47,7 +47,9 @@ vec2 texgen_object(vec4 vpos, mat4 mat, vec4 tp0, vec4 tp1)
tcoord.x = dot(vpos, tp0);
tcoord.y = dot(vpos, tp1);
-
+ tcoord.z = 0;
+ tcoord.w = 1;
+
tcoord = mat * tcoord;
return tcoord.xy;
diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp
index 4ac4d2136f..e9f00f6556 100644
--- a/indra/newview/llagentbenefits.cpp
+++ b/indra/newview/llagentbenefits.cpp
@@ -175,7 +175,7 @@ S32 LLAgentBenefits::getTextureUploadCost(const LLViewerTexture* tex) const
return getTextureUploadCost();
}
}
- return getTextureUploadCost();
+ return 0;
}
S32 LLAgentBenefits::getTextureUploadCost(const LLImageBase* tex) const
diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index f3b4d939aa..83c7b8a354 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -75,7 +75,7 @@ LLHeroProbeManager::~LLHeroProbeManager()
// helper class to seed octree with probes
void LLHeroProbeManager::update()
{
- if (!LLPipeline::RenderMirrors || gTeleportDisplay || LLStartUp::getStartupState() < STATE_PRECACHE)
+ if (!LLPipeline::RenderMirrors || !LLPipeline::sReflectionProbesEnabled || gTeleportDisplay || LLStartUp::getStartupState() < STATE_PRECACHE)
{
return;
}
@@ -112,7 +112,6 @@ void LLHeroProbeManager::update()
LLVector4a probe_pos;
LLVector3 camera_pos = LLViewerCamera::instance().mOrigin;
- F32 near_clip = 0.1f;
bool probe_present = false;
LLQuaternion cameraOrientation = LLViewerCamera::instance().getQuaternion();
LLVector3 cameraDirection = LLVector3::z_axis * cameraOrientation;
@@ -124,7 +123,7 @@ void LLHeroProbeManager::update()
float camera_center_distance = 99999.f;
for (auto vo : mHeroVOList)
{
- if (vo && !vo->isDead() && vo->mDrawable.notNull())
+ if (vo && !vo->isDead() && vo->mDrawable.notNull() && vo->isReflectionProbe() && vo->getReflectionProbeIsBox())
{
float distance = (LLViewerCamera::instance().getOrigin() - vo->getPositionAgent()).magVec();
float center_distance = cameraDirection * (vo->getPositionAgent() - camera_pos);
@@ -192,20 +191,15 @@ void LLHeroProbeManager::update()
// Iterate through each face of the cube
for (int i = 0; i < 6; i++)
{
- float cube_facing = fmax(-1, fmin(1.0f, cameraDirection * cubeFaces[i])) * 0.6 + 0.4;
+ float cube_facing = fmax(-1, fmin(1.0f, cameraDirection * cubeFaces[i]));
- float updateRate;
- if (cube_facing < 0.1f)
- {
- updateRate = 0;
- }
- else
- {
- updateRate = ceilf(cube_facing * gPipeline.RenderHeroProbeConservativeUpdateMultiplier);
+ cube_facing = 1 - cube_facing;
+
+ mFaceUpdateList[i] = ceilf(cube_facing * gPipeline.RenderHeroProbeConservativeUpdateMultiplier);
}
- mFaceUpdateList[i] = updateRate;
- }
+
+ mProbes[0]->mOrigin = probe_pos;
}
else
{
@@ -214,20 +208,24 @@ void LLHeroProbeManager::update()
mHeroProbeStrength = 1;
}
- else
- {
- probe_pos.load3(camera_pos.mV);
}
+void LLHeroProbeManager::renderProbes()
+{
+ if (!LLPipeline::RenderMirrors || !LLPipeline::sReflectionProbesEnabled || gTeleportDisplay ||
+ LLStartUp::getStartupState() < STATE_PRECACHE)
+ {
+ return;
+ }
static LLCachedControl<S32> sDetail(gSavedSettings, "RenderHeroReflectionProbeDetail", -1);
static LLCachedControl<S32> sLevel(gSavedSettings, "RenderHeroReflectionProbeLevel", 3);
- if (mNearestHero != nullptr)
+ F32 near_clip = 0.01f;
+ if (mNearestHero != nullptr && (gPipeline.RenderHeroProbeUpdateRate == 0 || (gFrameCount % gPipeline.RenderHeroProbeUpdateRate) == 0) &&
+ !gTeleportDisplay && !gDisconnected && !LLAppViewer::instance()->logoutRequestSent())
{
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("hpmu - realtime");
- // Probe 0 is always our mirror probe.
- mProbes[0]->mOrigin = probe_pos;
bool radiance_pass = gPipeline.mReflectionMapManager.isRadiancePass();
@@ -585,8 +583,6 @@ void LLHeroProbeManager::cleanup()
mDefaultProbe = nullptr;
mUpdatingProbe = nullptr;
- /*
- */
}
void LLHeroProbeManager::doOcclusion()
diff --git a/indra/newview/llheroprobemanager.h b/indra/newview/llheroprobemanager.h
index 5df146f2f1..e45b0049b2 100644
--- a/indra/newview/llheroprobemanager.h
+++ b/indra/newview/llheroprobemanager.h
@@ -68,6 +68,8 @@ public:
// maintain reflection probes
void update();
+ void renderProbes();
+
// debug display, called from llspatialpartition if reflection
// probe debug display is active
void renderDebug();
@@ -152,5 +154,6 @@ private:
std::vector<LLPointer<LLVOVolume>> mHeroVOList;
LLPointer<LLVOVolume> mNearestHero;
+
};
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 09b53dc801..26b6986a25 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -489,10 +489,7 @@ bool LLMaterialEditor::postBuild()
}
else
{
- getChild<LLUICtrl>("base_color_upload_fee")->setTextArg("[FEE]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost(mBaseColorFetched)));
- getChild<LLUICtrl>("metallic_upload_fee")->setTextArg("[FEE]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost(mMetallicRoughnessFetched)));
- getChild<LLUICtrl>("emissive_upload_fee")->setTextArg("[FEE]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost(mEmissiveFetched)));
- getChild<LLUICtrl>("normal_upload_fee")->setTextArg("[FEE]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost(mNormalFetched)));
+ refreshUploadCost();
}
boost::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData)
@@ -811,6 +808,37 @@ void LLMaterialEditor::resetUnsavedChanges()
}
}
+void LLMaterialEditor::refreshUploadCost()
+{
+ mExpectedUploadCost = 0;
+ if (mBaseColorTextureUploadId.notNull() && mBaseColorTextureUploadId == getBaseColorId() && mBaseColorFetched)
+ {
+ S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(mBaseColorFetched);
+ mExpectedUploadCost += upload_cost;
+ getChild<LLUICtrl>("base_color_upload_fee")->setTextArg("[FEE]", llformat("%d", upload_cost));
+ }
+ if (mMetallicTextureUploadId.notNull() && mMetallicTextureUploadId == getMetallicRoughnessId() && mMetallicRoughnessFetched)
+ {
+ S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(mMetallicRoughnessFetched);
+ mExpectedUploadCost += upload_cost;
+ getChild<LLUICtrl>("metallic_upload_fee")->setTextArg("[FEE]", llformat("%d", upload_cost));
+ }
+ if (mEmissiveTextureUploadId.notNull() && mEmissiveTextureUploadId == getEmissiveId() && mEmissiveFetched)
+ {
+ S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(mEmissiveFetched);
+ mExpectedUploadCost += upload_cost;
+ getChild<LLUICtrl>("emissive_upload_fee")->setTextArg("[FEE]", llformat("%d", upload_cost));
+ }
+ if (mNormalTextureUploadId.notNull() && mNormalTextureUploadId == getNormalId() && mNormalFetched)
+ {
+ S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(mNormalFetched);
+ mExpectedUploadCost += upload_cost;
+ getChild<LLUICtrl>("normal_upload_fee")->setTextArg("[FEE]", llformat("%d", upload_cost));
+ }
+
+ getChild<LLUICtrl>("total_upload_fee")->setTextArg("[FEE]", llformat("%d", mExpectedUploadCost));
+}
+
void LLMaterialEditor::markChangesUnsaved(U32 dirty_flag)
{
mUnsavedChanges |= dirty_flag;
@@ -841,25 +869,15 @@ void LLMaterialEditor::markChangesUnsaved(U32 dirty_flag)
setCanSave(false);
}
- mExpectedUploadCost = 0;
- if (mBaseColorTextureUploadId.notNull() && mBaseColorTextureUploadId == getBaseColorId() && mBaseColorFetched)
+ if ((dirty_flag & MATERIAL_BASE_COLOR_TEX_DIRTY)
+ || (dirty_flag & MATERIAL_NORMAL_TEX_DIRTY)
+ || (dirty_flag & MATERIAL_METALLIC_ROUGHTNESS_TEX_DIRTY)
+ || (dirty_flag & MATERIAL_EMISIVE_TEX_DIRTY)
+ || (dirty_flag == 0)
+ || (dirty_flag == U32_MAX))
{
- mExpectedUploadCost += LLAgentBenefitsMgr::current().getTextureUploadCost(mBaseColorFetched);
+ refreshUploadCost();
}
- if (mMetallicTextureUploadId.notNull() && mMetallicTextureUploadId == getMetallicRoughnessId() && mMetallicRoughnessFetched)
- {
- mExpectedUploadCost += LLAgentBenefitsMgr::current().getTextureUploadCost(mMetallicRoughnessFetched);
- }
- if (mEmissiveTextureUploadId.notNull() && mEmissiveTextureUploadId == getEmissiveId() && mEmissiveFetched)
- {
- mExpectedUploadCost += LLAgentBenefitsMgr::current().getTextureUploadCost(mEmissiveFetched);
- }
- if (mNormalTextureUploadId.notNull() && mNormalTextureUploadId == getNormalId() && mNormalFetched)
- {
- mExpectedUploadCost += LLAgentBenefitsMgr::current().getTextureUploadCost(mNormalFetched);
- }
-
- getChild<LLUICtrl>("total_upload_fee")->setTextArg("[FEE]", llformat("%d", mExpectedUploadCost));
}
void LLMaterialEditor::setCanSaveAs(bool value)
diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h
index be4aa219cd..232467460e 100644
--- a/indra/newview/llmaterialeditor.h
+++ b/indra/newview/llmaterialeditor.h
@@ -288,6 +288,7 @@ private:
// utility function for building a description of the imported material
// based on what we know about it.
const std::string buildMaterialDescription();
+ void refreshUploadCost();
void resetUnsavedChanges();
void markChangesUnsaved(U32 dirty_flag);
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index f527aef03f..16c38bf1f0 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -401,7 +401,7 @@ void LLPanelVolume::getState( )
getChildView("Probe Dynamic")->setEnabled(probe_enabled);
getChildView("Probe Update Type")->setEnabled(probe_enabled);
- getChildView("Probe Volume Type")->setEnabled(probe_enabled);
+ getChildView("Probe Volume Type")->setEnabled(probe_enabled && !is_mirror);
getChildView("Probe Ambiance")->setEnabled(probe_enabled && !is_mirror);
getChildView("Probe Near Clip")->setEnabled(probe_enabled && !is_mirror);
getChildView("Probe Update Label")->setEnabled(probe_enabled);
@@ -1432,6 +1432,8 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata)
bool is_mirror = update_type.find("Mirror") != std::string::npos;
+ self->getChildView("Probe Volume Type")->setEnabled(!is_mirror);
+
volobjp->setReflectionProbeIsDynamic(update_type.find("Dynamic") != std::string::npos);
volobjp->setReflectionProbeIsMirror(is_mirror);
@@ -1440,7 +1442,7 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata)
std::string shape_type = self->getChild<LLUICtrl>("Probe Volume Type")->getValue().asString();
- bool is_box = shape_type == "Box";
+ bool is_box = shape_type == "Box" || is_mirror;
if (volobjp->setReflectionProbeIsBox(is_box))
{
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 961b9368fb..b0853de932 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -658,10 +658,11 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
{
// Render mirrors and associated hero probes before we render the rest of the scene.
// This ensures the scene state in the hero probes are exactly the same as the rest of the scene before we render it.
- if (gPipeline.RenderMirrors && !gSnapshot && (gPipeline.RenderHeroProbeUpdateRate == 0 || (gFrameCount % gPipeline.RenderHeroProbeUpdateRate) == 0))
+ if (gPipeline.RenderMirrors && !gSnapshot)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("Update hero probes");
gPipeline.mHeroProbeManager.update();
+ gPipeline.mHeroProbeManager.renderProbes();
}
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 1");