diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 60ad7e8fe5..50b0cf02bc 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -42,8 +42,8 @@ jobs:
needs: setup
strategy:
matrix:
- runner: [windows-large, macos-15-xlarge]
- configuration: ${{ fromJSON(needs.setup.outputs.configurations) }}
+ runner: ${{ fromJson((github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/Second_Life')) && '["windows-large","macos-15-xlarge"]' || '["windows-latest","macos-15"]') }}
+ configuration: ${{ fromJson(needs.setup.outputs.configurations) }}
runs-on: ${{ matrix.runner }}
outputs:
viewer_channel: ${{ steps.build.outputs.viewer_channel }}
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index cbce9a87d5..d07a0dc159 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -901,7 +901,7 @@ void LLButton::draw()
// Highlight if needed
if( ll::ui::SearchableControl::getHighlighted() )
- label_color = ll::ui::SearchableControl::getHighlightColor();
+ label_color = ll::ui::SearchableControl::getHighlightFontColor();
// overlay with keyboard focus border
if (hasFocus())
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 6fffea386f..42451bd83f 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -529,7 +529,7 @@ void LLMenuItemGL::draw( void )
// Highlight if needed
if( ll::ui::SearchableControl::getHighlighted() )
- color = ll::ui::SearchableControl::getHighlightColor();
+ color = ll::ui::SearchableControl::getHighlightFontColor();
// Draw the text on top.
if (mBriefItem)
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index decbe36ea3..f3f4cf68ba 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -3861,7 +3861,7 @@ bool LLScrollListCtrl::highlightMatchingItems(const std::string& filter_str)
bool res = false;
- setHighlightedColor(LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red4));
+ setHighlightedColor(LLUIColorTable::instance().getColor("SearchableControlHighlightBgColor", LLColor4::red4));
std::string filter_str_lc(filter_str);
LLStringUtil::toLower(filter_str_lc);
diff --git a/indra/llui/llsearchablecontrol.h b/indra/llui/llsearchablecontrol.h
index 7f1421dd19..bae85fe9a5 100644
--- a/indra/llui/llsearchablecontrol.h
+++ b/indra/llui/llsearchablecontrol.h
@@ -43,9 +43,15 @@ namespace ll
virtual ~SearchableControl()
{ }
- const LLColor4& getHighlightColor( ) const
+ const LLColor4& getHighlightBgColor( ) const
{
- static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red4);
+ static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightBgColor", LLColor4::red4);
+ return highlight_color.get();
+ }
+
+ const LLColor4& getHighlightFontColor() const
+ {
+ static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightFontColor", LLColor4::red4);
return highlight_color.get();
}
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index ed6b211b7b..68b619f4b4 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1524,7 +1524,7 @@ void LLTextBase::draw()
// Draw highlighted if needed
if( ll::ui::SearchableControl::getHighlighted() )
{
- const LLColor4& bg_color = ll::ui::SearchableControl::getHighlightColor();
+ const LLColor4& bg_color = ll::ui::SearchableControl::getHighlightBgColor();
LLRect bg_rect = mVisibleTextRect;
if( mScroller )
bg_rect.intersectWith( text_rect );
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
index 205d4bff6d..5089b9e31e 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
@@ -154,6 +154,7 @@ void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, ou
if (classic_mode < 1)
{
amblit = srgb_to_linear(amblit);
+ amblit = vec3(dot(amblit, vec3(0.2126, 0.7152, 0.0722)));
sunlit = srgb_to_linear(sunlit);
}
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 01102a783f..cfb20c331a 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -86,7 +86,6 @@ RenderTonemapType 1 1
RenderTonemapMix 1 1
RenderDisableVintageMode 1 1
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 256
//
// Low Graphics Settings
@@ -129,7 +128,6 @@ RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 512
-RenderReflectionProbeCount 1 1
//
// Medium Low Graphics Settings
@@ -172,7 +170,6 @@ RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 1024
-RenderReflectionProbeCount 1 16
//
// Medium Graphics Settings (standard)
@@ -214,7 +211,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 32
//
// Medium High Graphics Settings
@@ -245,7 +241,7 @@ RenderFSAASamples 1 1
RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 1
RenderScreenSpaceReflections 1 0
-RenderReflectionProbeLevel 1 2
+RenderReflectionProbeLevel 1 1
RenderMirrors 1 0
RenderHeroProbeResolution 1 512
RenderHeroProbeDistance 1 6
@@ -256,7 +252,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 64
//
// High Graphics Settings (SSAO + sun shadows)
@@ -287,7 +282,7 @@ RenderFSAASamples 1 2
RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 1
RenderScreenSpaceReflections 1 0
-RenderReflectionProbeLevel 1 3
+RenderReflectionProbeLevel 1 2
RenderMirrors 1 0
RenderHeroProbeResolution 1 512
RenderHeroProbeDistance 1 8
@@ -298,7 +293,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 128
//
// High Ultra Graphics Settings (deferred + SSAO + all shadows)
@@ -340,7 +334,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 256
//
// Ultra graphics (REALLY PURTY!)
@@ -382,7 +375,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 256
//
// Class Unknown Hardware (unknown)
@@ -416,7 +408,6 @@ RenderReflectionProbeDetail 0 -1
RenderMirrors 0 0
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 0 0
list Intel
RenderAnisotropic 1 0
@@ -438,7 +429,6 @@ RenderMirrors 0 0
RenderGLMultiThreadedTextures 0 0
RenderGLMultiThreadedMedia 0 0
RenderDisableVintageMode 1 0
-RenderReflectionProbeCount 0 0
list TexUnit16orLess
RenderTerrainPBRDetail 1 -1
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 4a3b1a4181..297383756c 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -86,7 +86,6 @@ RenderTonemapType 1 1
RenderTonemapMix 1 1
RenderDisableVintageMode 1 1
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 256
//
// Low Graphics Settings
@@ -129,7 +128,6 @@ RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 512
-RenderReflectionProbeCount 1 1
//
// Medium Low Graphics Settings
@@ -172,7 +170,6 @@ RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 1024
-RenderReflectionProbeCount 1 16
//
// Medium Graphics Settings (standard)
@@ -214,7 +211,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 32
//
// Medium High Graphics Settings
@@ -245,7 +241,7 @@ RenderFSAASamples 1 1
RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 1
RenderScreenSpaceReflections 1 0
-RenderReflectionProbeLevel 1 2
+RenderReflectionProbeLevel 1 1
RenderMirrors 1 0
RenderHeroProbeResolution 1 512
RenderHeroProbeDistance 1 6
@@ -256,7 +252,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 64
//
// High Graphics Settings (SSAO + sun shadows)
@@ -287,7 +282,7 @@ RenderFSAASamples 1 2
RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 1
RenderScreenSpaceReflections 1 0
-RenderReflectionProbeLevel 1 3
+RenderReflectionProbeLevel 1 2
RenderMirrors 1 0
RenderHeroProbeResolution 1 512
RenderHeroProbeDistance 1 8
@@ -298,7 +293,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 128
//
// High Ultra Graphics Settings (deferred + SSAO + all shadows)
@@ -340,7 +334,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 256
//
// Ultra graphics (REALLY PURTY!)
@@ -382,7 +375,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 256
//
// Class Unknown Hardware (unknown)
@@ -416,7 +408,6 @@ RenderReflectionProbeDetail 0 -1
RenderMirrors 0 0
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 0 0
list Intel
RenderAnisotropic 1 0
@@ -440,7 +431,6 @@ RenderMirrors 0 0
RenderGLMultiThreadedTextures 0 0
RenderGLMultiThreadedMedia 0 0
RenderDisableVintageMode 1 0
-RenderReflectionProbeCount 0 0
list TexUnit16orLess
RenderTerrainPBRDetail 1 -1
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 10846eefef..5b2322ee46 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -86,7 +86,6 @@ RenderTonemapMix 1 1
RenderDisableVintageMode 1 1
RenderDownScaleMethod 1 0
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 256
//
// Low Graphics Settings
@@ -129,7 +128,6 @@ RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 512
-RenderReflectionProbeCount 1 1
//
// Medium Low Graphics Settings
@@ -172,7 +170,6 @@ RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 1024
-RenderReflectionProbeCount 1 16
//
// Medium Graphics Settings (standard)
@@ -214,7 +211,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 32
//
// Medium High Graphics Settings
@@ -256,7 +252,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 64
//
// High Graphics Settings (SSAO + sun shadows)
@@ -298,7 +293,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 128
//
// High Ultra Graphics Settings (SSAO + all shadows)
@@ -340,7 +334,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 256
//
// Ultra graphics (REALLY PURTY!)
@@ -382,7 +375,6 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 1 256
//
// Class Unknown Hardware (unknown)
@@ -415,7 +407,6 @@ RenderShadowDetail 0 0
RenderMirrors 0 0
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 2048
-RenderReflectionProbeCount 0 0
list TexUnit8orLess
RenderDeferredSSAO 0 0
@@ -456,7 +447,6 @@ RenderReflectionProbeDetail 0 0
RenderReflectionsEnabled 0 0
RenderMirrors 0 0
RenderDisableVintageMode 1 0
-RenderReflectionProbeCount 0 0
list VaryingVectors16orLess
RenderTerrainPBRPlanarSampleCount 1 1
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index d7b5124202..1e13fd939a 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -114,13 +114,9 @@ void LLDrawPoolTree::beginShadowPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
- // Attempt to speed up things a little
- // glPolygonOffset(gSavedSettings.getF32("RenderDeferredTreeShadowOffset"),
- // gSavedSettings.getF32("RenderDeferredTreeShadowBias"));
- static LLCachedControl RenderDeferredTreeShadowOffset(gSavedSettings, "RenderDeferredTreeShadowOffset");
- static LLCachedControl RenderDeferredTreeShadowBias(gSavedSettings, "RenderDeferredTreeShadowBias");
- glPolygonOffset(RenderDeferredTreeShadowOffset, RenderDeferredTreeShadowBias);
- //
+ static LLCachedControl shadow_offset(gSavedSettings, "RenderDeferredTreeShadowOffset");
+ static LLCachedControl shadow_bias(gSavedSettings, "RenderDeferredTreeShadowBias");
+ glPolygonOffset(shadow_offset(), shadow_bias());
LLEnvironment& environment = LLEnvironment::instance();
diff --git a/indra/newview/llfetchedgltfmaterial.cpp b/indra/newview/llfetchedgltfmaterial.cpp
index c2821d56d6..558fc92018 100644
--- a/indra/newview/llfetchedgltfmaterial.cpp
+++ b/indra/newview/llfetchedgltfmaterial.cpp
@@ -199,6 +199,7 @@ bool LLFetchedGLTFMaterial::replaceLocalTexture(const LLUUID& tracking_id, const
{
mTrackingIdToLocalTexture.erase(tracking_id);
}
+ updateLocalTexDataDigest();
return res;
}
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 8729927a99..e8af21ac23 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -293,8 +293,9 @@ void LLLocalBitmap::addGLTFMaterial(LLGLTFMaterial* mat)
return;
}
- mat_list_t::iterator end = mGLTFMaterialWithLocalTextures.end();
- for (mat_list_t::iterator it = mGLTFMaterialWithLocalTextures.begin(); it != end;)
+ mat->addLocalTextureTracking(getTrackingID(), getWorldID());
+
+ for (mat_list_t::iterator it = mGLTFMaterialWithLocalTextures.begin(); it != mGLTFMaterialWithLocalTextures.end();)
{
if (it->get() == mat)
{
@@ -304,15 +305,12 @@ void LLLocalBitmap::addGLTFMaterial(LLGLTFMaterial* mat)
if ((*it)->getNumRefs() == 1)
{
it = mGLTFMaterialWithLocalTextures.erase(it);
- end = mGLTFMaterialWithLocalTextures.end();
}
else
{
it++;
}
}
-
- mat->addLocalTextureTracking(getTrackingID(), getWorldID());
mGLTFMaterialWithLocalTextures.push_back(mat);
}
@@ -637,16 +635,16 @@ void LLLocalBitmap::updateUserLayers(LLUUID old_id, LLUUID new_id, LLWearableTyp
void LLLocalBitmap::updateGLTFMaterials(LLUUID old_id, LLUUID new_id)
{
// Might be a better idea to hold this in LLGLTFMaterialList
- mat_list_t::iterator end = mGLTFMaterialWithLocalTextures.end();
- for (mat_list_t::iterator it = mGLTFMaterialWithLocalTextures.begin(); it != end;)
+ for (mat_list_t::iterator it = mGLTFMaterialWithLocalTextures.begin(); it != mGLTFMaterialWithLocalTextures.end();)
{
if ((*it)->getNumRefs() == 1)
{
// render and override materials are often recreated,
// clean up any remains
it = mGLTFMaterialWithLocalTextures.erase(it);
- end = mGLTFMaterialWithLocalTextures.end();
}
+ // Render material consists of base and override materials, make sure replaceLocalTexture
+ // gets called for base and override before applyOverride
else if ((*it)->replaceLocalTexture(mTrackingID, old_id, new_id))
{
it++;
@@ -656,43 +654,47 @@ void LLLocalBitmap::updateGLTFMaterials(LLUUID old_id, LLUUID new_id)
// Matching id not found, no longer in use
// material would clean itself, remove from the list
it = mGLTFMaterialWithLocalTextures.erase(it);
- end = mGLTFMaterialWithLocalTextures.end();
}
}
- // Render material consists of base and override materials, make sure replaceLocalTexture
- // gets called for base and override before applyOverride
- end = mGLTFMaterialWithLocalTextures.end();
- for (mat_list_t::iterator it = mGLTFMaterialWithLocalTextures.begin(); it != end;)
+ // Updating render materials calls updateTextureTracking which can modify
+ // mGLTFMaterialWithLocalTextures, so precollect all entries that need to be updated
+ std::set update_entries;
+ for (LLGLTFMaterial* mat : mGLTFMaterialWithLocalTextures)
{
- LLFetchedGLTFMaterial* fetched_mat = dynamic_cast((*it).get());
+ // mGLTFMaterialWithLocalTextures includes overrides that are not 'fetched'
+ // and don't have texture entries (they don't need to since render material does).
+ LLFetchedGLTFMaterial* fetched_mat = dynamic_cast(mat);
if (fetched_mat)
{
for (LLTextureEntry* entry : fetched_mat->mTextureEntires)
{
- // Normally a change in applied material id is supposed to
- // drop overrides thus reset material, but local materials
- // currently reuse their existing asset id, and purpose is
- // to preview how material will work in-world, overrides
- // included, so do an override to render update instead.
- LLGLTFMaterial* override_mat = entry->getGLTFMaterialOverride();
- if (override_mat)
- {
- // do not create a new material, reuse existing pointer
- LLFetchedGLTFMaterial* render_mat = dynamic_cast(entry->getGLTFRenderMaterial());
- if (render_mat)
- {
- *render_mat = *fetched_mat;
- render_mat->applyOverride(*override_mat);
- }
- else
- {
- LL_WARNS_ONCE() << "Failed to apply local material override, render material not found" << LL_ENDL;
- }
- }
+ update_entries.insert(entry);
+ }
+ }
+ }
+
+
+ for (LLTextureEntry* entry : update_entries)
+ {
+ // Normally a change in applied material id is supposed to
+ // drop overrides thus reset material, but local materials
+ // currently reuse their existing asset id, and purpose is
+ // to preview how material will work in-world, overrides
+ // included, so do an override to render update instead.
+ LLGLTFMaterial* override_mat = entry->getGLTFMaterialOverride();
+ LLGLTFMaterial* mat = entry->getGLTFMaterial();
+ if (override_mat && mat)
+ {
+ // do not create a new material, reuse existing pointer
+ // so that mTextureEntires remains untouched
+ LLGLTFMaterial* render_mat = entry->getGLTFRenderMaterial();
+ if (render_mat)
+ {
+ *render_mat = *mat;
+ render_mat->applyOverride(*override_mat); // can update mGLTFMaterialWithLocalTextures
}
}
- ++it;
}
}
diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h
index e169f96e70..de2dcb3467 100644
--- a/indra/newview/lllocalbitmaps.h
+++ b/indra/newview/lllocalbitmaps.h
@@ -106,7 +106,7 @@ class LLLocalBitmap
// Store a list of accosiated materials
// Might be a better idea to hold this in LLGLTFMaterialList
- typedef std::vector > mat_list_t;
+ typedef std::list > mat_list_t;
mat_list_t mGLTFMaterialWithLocalTextures;
};
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index a77aa5b40d..b947038ba7 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -4751,6 +4751,8 @@ void LLMeshRepository::notifyLoadedMeshes()
std::partial_sort(mPendingRequests.begin(), mPendingRequests.begin() + push_count,
mPendingRequests.end(), PendingRequestBase::CompareScoreGreater());
}
+ LLMutexTrylock lock3(mThread->mHeaderMutex);
+ LLMutexTrylock lock4(mThread->mPendingMutex);
while (!mPendingRequests.empty() && push_count > 0)
{
std::unique_ptr& req_p = mPendingRequests.front();
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 453ebf29ad..f1a67ae644 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -3185,6 +3185,8 @@ void LLPanelFace::onCommitHideWater()
{
// reset texture to default plywood
LLSelectMgr::getInstance()->selectionSetImage(DEFAULT_OBJECT_TEXTURE);
+ // reset texture repeats, that might be altered by invisiprim script from wiki
+ LLSelectMgr::getInstance()->selectionTexScaleAutofit(2.f);
}
}
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp
index f3adb52d5e..910509928d 100644
--- a/indra/newview/llreflectionmap.cpp
+++ b/indra/newview/llreflectionmap.cpp
@@ -52,6 +52,9 @@ LLReflectionMap::~LLReflectionMap()
void LLReflectionMap::update(U32 resolution, U32 face, bool force_dynamic, F32 near_clip, bool useClipPlane, LLPlane clipPlane)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
+ if (!mCubeArray.notNull())
+ return;
+
mLastUpdateTime = gFrameTimeSeconds;
llassert(mCubeArray.notNull());
llassert(mCubeIndex != -1);
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index f99163cb52..6447d8ae77 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -144,13 +144,14 @@ static void touch_default_probe(LLReflectionMap* probe)
LLReflectionMapManager::LLReflectionMapManager()
{
+ mDynamicProbeCount = LL_MAX_REFLECTION_PROBE_COUNT;
initCubeFree();
}
void LLReflectionMapManager::initCubeFree()
{
// start at 1 because index 0 is reserved for mDefaultProbe
- for (int i = 1; i < LL_MAX_REFLECTION_PROBE_COUNT; ++i)
+ for (U32 i = 1; i < mDynamicProbeCount; ++i)
{
mCubeFree.push_back(i);
}
@@ -221,15 +222,50 @@ void LLReflectionMapManager::update()
resume();
}
- static LLCachedControl probe_count(gSavedSettings, "RenderReflectionProbeCount", 256U);
- bool countReset = mReflectionProbeCount != probe_count;
+ static LLCachedControl sDetail(gSavedSettings, "RenderReflectionProbeDetail", -1);
+ static LLCachedControl sLevel(gSavedSettings, "RenderReflectionProbeLevel", 3);
- if (countReset)
+ // Once every 20 frames, update the dynamic probe count.
+ if (gFrameCount % 20)
{
- mResetFade = -0.5f;
+ U32 probe_count_temp = mDynamicProbeCount;
+ if (sLevel == 0)
+ {
+ mDynamicProbeCount = 1;
+ }
+ else if (sLevel == 1)
+ {
+ mDynamicProbeCount = (U32)mProbes.size();
+
+ }
+ else if (sLevel == 2)
+ {
+ mDynamicProbeCount = llmax((U32)mProbes.size(), 128);
+ }
+ else
+ {
+ mDynamicProbeCount = 256;
+ }
+
+ // Round mDynamicProbeCount to the nearest increment of 32
+ mDynamicProbeCount = ((mDynamicProbeCount + 16) / 32) * 32;
+ mDynamicProbeCount = llclamp(mDynamicProbeCount, 1, LL_MAX_REFLECTION_PROBE_COUNT);
+
+ if (mDynamicProbeCount < probe_count_temp * 1.1 && mDynamicProbeCount > probe_count_temp * 0.9)
+ mDynamicProbeCount = probe_count_temp;
+ else
+ mGlobalFadeTarget = 0.f;
}
- initReflectionMaps();
+ if (mGlobalFadeTarget < mResetFade)
+ mResetFade = llmax(mGlobalFadeTarget, mResetFade - (F32)gFrameIntervalSeconds * 2);
+ else
+ mResetFade = llmin(mGlobalFadeTarget, mResetFade + (F32)gFrameIntervalSeconds * 2);
+
+ if (mResetFade == mGlobalFadeTarget)
+ {
+ initReflectionMaps();
+ }
static LLCachedControl render_hdr(gSavedSettings, "RenderHDREnabled", true);
@@ -286,9 +322,6 @@ void LLReflectionMapManager::update()
bool did_update = false;
- static LLCachedControl sDetail(gSavedSettings, "RenderReflectionProbeDetail", -1);
- static LLCachedControl sLevel(gSavedSettings, "RenderReflectionProbeLevel", 3);
-
bool realtime = sDetail >= (S32)LLReflectionMapManager::DetailLevel::REALTIME;
LLReflectionMap* closestDynamic = nullptr;
@@ -343,12 +376,7 @@ void LLReflectionMapManager::update()
}
}
- if (countReset)
- {
- mResetFade = -0.5f;
- }
-
- mResetFade = llmin((F32)(mResetFade + gFrameIntervalSeconds), 1.f);
+ mResetFade = llmin((F32)(mResetFade + gFrameIntervalSeconds * 2.f), 1.f);
for (unsigned int i = 0; i < mProbes.size(); ++i)
{
@@ -520,6 +548,16 @@ LLReflectionMap* LLReflectionMapManager::addProbe(LLSpatialGroup* group)
return probe;
}
+U32 LLReflectionMapManager::probeCount()
+{
+ return mDynamicProbeCount;
+}
+
+U32 LLReflectionMapManager::probeMemory()
+{
+ return (mDynamicProbeCount * 6 * (mProbeResolution * mProbeResolution) * 4) / 1024 / 1024 + (mDynamicProbeCount * 6 * (LL_IRRADIANCE_MAP_RESOLUTION * LL_IRRADIANCE_MAP_RESOLUTION) * 4) / 1024 / 1024;
+}
+
struct CompareProbeDepth
{
bool operator()(const LLReflectionMap* lhs, const LLReflectionMap* rhs)
@@ -1058,7 +1096,11 @@ void LLReflectionMapManager::updateUniforms()
bool is_ambiance_pass = gCubeSnapshot && !isRadiancePass();
F32 ambscale = is_ambiance_pass ? 0.f : 1.f;
+ ambscale *= mResetFade;
+ ambscale = llmax(0, ambscale);
F32 radscale = is_ambiance_pass ? 0.5f : 1.f;
+ radscale *= mResetFade;
+ radscale = llmax(0, radscale);
for (auto* refmap : mReflectionMaps)
{
@@ -1129,8 +1171,8 @@ void LLReflectionMapManager::updateUniforms()
}
mProbeData.refParams[count].set(
- llmax(minimum_ambiance, refmap->getAmbiance())*ambscale * llmax(mResetFade, 0.f), // ambiance scale
- radscale * llmax(mResetFade, 0.f), // radiance scale
+ llmax(minimum_ambiance, refmap->getAmbiance())*ambscale, // ambiance scale
+ radscale, // radiance scale
refmap->mFadeIn, // fade in weight
oa.getF32ptr()[2] - refmap->mRadius); // z near
@@ -1365,12 +1407,9 @@ void LLReflectionMapManager::renderDebug()
void LLReflectionMapManager::initReflectionMaps()
{
- static LLCachedControl probe_count(gSavedSettings, "RenderReflectionProbeCount", 256U);
- U32 count = probe_count();
-
static LLCachedControl ref_probe_res(gSavedSettings, "RenderReflectionProbeResolution", 128U);
U32 probe_resolution = nhpo2(llclamp(ref_probe_res(), (U32)64, (U32)512));
- if (mTexture.isNull() || mReflectionProbeCount != count || mProbeResolution != probe_resolution || mReset)
+ if (mTexture.isNull() || mReflectionProbeCount != mDynamicProbeCount || mProbeResolution != probe_resolution || mReset)
{
if(mProbeResolution != probe_resolution)
{
@@ -1379,9 +1418,10 @@ void LLReflectionMapManager::initReflectionMaps()
}
gEXRImage = nullptr;
-
+ mGlobalFadeTarget = 1.f;
+ mResetFade = -0.125f;
mReset = false;
- mReflectionProbeCount = count;
+ mReflectionProbeCount = mDynamicProbeCount;
mProbeResolution = probe_resolution;
mMaxProbeLOD = log2f((F32)mProbeResolution) - 1.f; // number of mips - 1
diff --git a/indra/newview/llreflectionmapmanager.h b/indra/newview/llreflectionmapmanager.h
index 9f88776ac2..0719c28134 100644
--- a/indra/newview/llreflectionmapmanager.h
+++ b/indra/newview/llreflectionmapmanager.h
@@ -38,7 +38,7 @@ class LLViewerObject;
#define LL_MAX_REFLECTION_PROBE_COUNT 256
// reflection probe resolution
-#define LL_IRRADIANCE_MAP_RESOLUTION 64
+#define LL_IRRADIANCE_MAP_RESOLUTION 16
// reflection probe mininum scale
#define LL_REFLECTION_PROBE_MINIMUM_SCALE 1.f;
@@ -159,6 +159,9 @@ public:
// with false when done.
void forceDefaultProbeAndUpdateUniforms(bool force = true);
+ U32 probeCount();
+ U32 probeMemory();
+
private:
friend class LLPipeline;
friend class LLHeroProbeManager;
@@ -166,6 +169,9 @@ private:
// initialize mCubeFree array to default values
void initCubeFree();
+ // Just does a bulk clear of all of the cubemaps.
+ void clearCubeMaps();
+
// delete the probe with the given index in mProbes
void deleteProbe(U32 i);
@@ -240,6 +246,8 @@ private:
// number of reflection probes to use for rendering
U32 mReflectionProbeCount;
+ U32 mDynamicProbeCount;
+
// resolution of reflection probes
U32 mProbeResolution = 128;
@@ -253,6 +261,7 @@ private:
bool mReset = false;
float mResetFade = 1.f;
+ float mGlobalFadeTarget = 1.f;
// if true, only update the default probe
bool mPaused = false;
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 7335fd4c8f..f1d2c7759b 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -584,11 +584,13 @@ void LLGLTexMemBar::draw()
gGL.color4f(0.f, 0.f, 0.f, 0.25f);
gl_rect_2d(-10, getRect().getHeight() + line_height*2 + 1, getRect().getWidth()+2, getRect().getHeight()+2);
- text = llformat("Est. Free: %d MB Sys Free: %d MB GL Tex: %d MB FBO: %d MB Bias: %.2f Cache: %.1f/%.1f MB",
+ text = llformat("Est. Free: %d MB Sys Free: %d MB GL Tex: %d MB FBO: %d MB Probe#: %d Probe Mem: %d MB Bias: %.2f Cache: %.1f/%.1f MB",
(S32)LLViewerTexture::sFreeVRAMMegabytes,
LLMemory::getAvailableMemKB()/1024,
LLImageGL::getTextureBytesAllocated() / 1024 / 1024,
LLRenderTarget::sBytesAllocated/(1024*1024),
+ gPipeline.mReflectionMapManager.probeCount(),
+ gPipeline.mReflectionMapManager.probeMemory(),
discard_bias,
cache_usage,
cache_max_usage);
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 15caae9e05..1e0e5a941b 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -5001,6 +5001,18 @@ void LLViewerObject::setPositionParent(const LLVector3 &pos_parent, bool damped)
else
{
setPositionRegion(pos_parent, damped);
+
+ // #1964 mark reflection probe in the linkset to update position after moving via script
+ for (LLViewerObject* child : mChildList)
+ {
+ if (child && child->isReflectionProbe())
+ {
+ if (LLDrawable* drawablep = child->mDrawable)
+ {
+ gPipeline.markMoved(drawablep);
+ }
+ }
+ }
}
}
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index 7d99637666..49abf74f40 100644
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -593,7 +593,7 @@ void LLViewerParcelOverlay::addPropertyLine(F32 start_x, F32 start_y, F32 dx, F3
outside_y += dy * (dy - LINE_WIDTH);
// Middle part, full width
- const S32 GRID_STEP = S32( PARCEL_GRID_STEP_METERS );
+ const S32 GRID_STEP = (S32)PARCEL_GRID_STEP_METERS;
for (S32 i = 1; i < GRID_STEP; i++)
{
inside_z = land.resolveHeightRegion( inside_x, inside_y );
@@ -682,7 +682,9 @@ void LLViewerParcelOverlay::renderPropertyLines()
return;
LLSurface& land = mRegion->getLand();
- F32 water_z = land.getWaterHeight() + 0.01f;
+
+ bool render_water = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_WATER);
+ F32 water_z = render_water ? land.getWaterHeight() + 0.01f : 0;
LLGLSUIDefault gls_ui; // called from pipeline
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index d6329f3177..bba0895e08 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -524,9 +524,11 @@ void LLViewerTexture::updateClass()
F32 used = (F32)ll_round(texture_bytes_alloc + vertex_bytes_alloc);
// Expose max texture VRAM setting
- //F32 budget = max_vram_budget == 0 ? (F32)gGLManager.mVRAM : (F32)max_vram_budget;
- F32 budget = !max_vram_budget_enabled ? (F32)gGLManager.mVRAM : (F32)max_vram_budget;
- budget /= tex_vram_divisor;
+ // But when manual control is not enabled, use the VRAM divisor.
+ // While we're at it, assume we have 1024 to play with at minimum when the divisor is in use. Works more elegantly with the logic below this.
+ // -Geenz 2025-03-21
+ // F32 budget = max_vram_budget == 0 ? llmax(1024, (F32)gGLManager.mVRAM / tex_vram_divisor) : (F32)max_vram_budget;
+ F32 budget = !max_vram_budget_enabled ? llmax(1024, (F32)gGLManager.mVRAM / (tex_vram_divisor() > 0.f ? tex_vram_divisor() : 1.f)) : (F32)max_vram_budget;
// Try to leave at least half a GB for everyone else and for bias,
// but keep at least 768MB for ourselves
@@ -540,7 +542,6 @@ void LLViewerTexture::updateClass()
bool is_sys_low = isSystemMemoryLow();
bool is_low = is_sys_low || over_pct > 0.f;
- F32 discard_bias = sDesiredDiscardBias;
static bool was_low = false;
static bool was_sys_low = false;
@@ -595,6 +596,7 @@ void LLViewerTexture::updateClass()
// set to max discard bias if the window has been backgrounded for a while
static F32 last_desired_discard_bias = 1.f;
+ static F32 last_texture_update_count_bias = 1.f;
static bool was_backgrounded = false;
static LLFrameTimer backgrounded_timer;
static LLCachedControl minimized_discard_time(gSavedSettings, "TextureDiscardMinimizedTime", 1.f);
@@ -630,12 +632,21 @@ void LLViewerTexture::updateClass()
}
sDesiredDiscardBias = llclamp(sDesiredDiscardBias, 1.f, 4.f);
- if (discard_bias != sDesiredDiscardBias)
+ if (last_texture_update_count_bias < sDesiredDiscardBias)
{
- // bias changed, reset texture update counter to
+ // bias increased, reset texture update counter to
// let updates happen at an increased rate.
+ last_texture_update_count_bias = sDesiredDiscardBias;
sBiasTexturesUpdated = 0;
}
+ else if (last_texture_update_count_bias > sDesiredDiscardBias + 0.1f)
+ {
+ // bias decreased, 0.1f is there to filter out small fluctuations
+ // and not reset sBiasTexturesUpdated too often.
+ // Bias jumps to 1.5 at low memory, so getting stuck at 1.1 is not
+ // a problem.
+ last_texture_update_count_bias = sDesiredDiscardBias;
+ }
LLViewerTexture::sFreezeImageUpdates = false;
}
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 4101ec5f33..fd34d13037 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1073,7 +1073,8 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
vsize /= min_scale;
// apply bias to offscreen faces all the time, but only to onscreen faces when bias is large
- if (!face->mInFrustum || LLViewerTexture::sDesiredDiscardBias > 2.f)
+ // use mImportanceToCamera to make bias switch a bit more gradual
+ if (!face->mInFrustum || LLViewerTexture::sDesiredDiscardBias > 1.9f + face->mImportanceToCamera / 2.f)
{
vsize /= bias;
}
diff --git a/indra/newview/skins/ansastorm/colors.xml b/indra/newview/skins/ansastorm/colors.xml
index 70634c08d7..c19e259f61 100644
--- a/indra/newview/skins/ansastorm/colors.xml
+++ b/indra/newview/skins/ansastorm/colors.xml
@@ -1085,7 +1085,13 @@
-
+
+
+
@@ -1374,9 +1380,6 @@
-
diff --git a/indra/newview/skins/ansastorm/themes/blood/colors.xml b/indra/newview/skins/ansastorm/themes/blood/colors.xml
index a68adcd3ff..b24d4988f7 100644
--- a/indra/newview/skins/ansastorm/themes/blood/colors.xml
+++ b/indra/newview/skins/ansastorm/themes/blood/colors.xml
@@ -1032,6 +1032,12 @@
+
+
-
diff --git a/indra/newview/skins/ansastorm/themes/classic_brown/colors.xml b/indra/newview/skins/ansastorm/themes/classic_brown/colors.xml
index e35d792e45..0f57699a34 100644
--- a/indra/newview/skins/ansastorm/themes/classic_brown/colors.xml
+++ b/indra/newview/skins/ansastorm/themes/classic_brown/colors.xml
@@ -1082,6 +1082,12 @@
+
+
-
diff --git a/indra/newview/skins/ansastorm/themes/ectoplasma/colors.xml b/indra/newview/skins/ansastorm/themes/ectoplasma/colors.xml
index 461399ee4e..39c6ad5bd0 100644
--- a/indra/newview/skins/ansastorm/themes/ectoplasma/colors.xml
+++ b/indra/newview/skins/ansastorm/themes/ectoplasma/colors.xml
@@ -1020,6 +1020,12 @@
+
+
-
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index d7bbd28619..916cfbd71d 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -1028,6 +1028,12 @@
+
+
-
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
index ccf7a501ce..3249736b1a 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
@@ -236,7 +236,6 @@
-
Tone Mapper:
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index 268a6e66d7..6f296a618d 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -858,23 +858,6 @@
value="3"/>
-
-
-