diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 17152b8e46..045676c2d1 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -644,6 +644,18 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
imagep->setExplicitFormat(internal_format, primary_format);
}
+ // [FIRE-35428] - Mega prim issue - fix compressed sculpted textures
+ // Sculpted textures use the RGBA data for coodinates, so any compression can cause artifacts.
+ if (boost_priority == LLViewerFetchedTexture::BOOST_SCULPTED)
+ {
+ // Disable the compression of BOOST_SCULPTED textures
+ if (imagep->getGLTexture())
+ {
+ imagep->getGLTexture()->setAllowCompression(false);
+ }
+ }
+ // [FIRE-35428]
+
addImage(imagep, get_element_type(boost_priority));
if (boost_priority != 0)
@@ -671,7 +683,11 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
}
// Keep Fast Cache option
- if (fast_cache_fetching_enabled)
+ // [FIRE-35428] - Mega prim issue - fix compressed sculpted textures
+ //if(fast_cache_fetching_enabled)
+ // If the texture is Sculpted, don't allow it to be added to fast cache as it can affect the texture.
+ if(fast_cache_fetching_enabled && boost_priority != LLViewerFetchedTexture::BOOST_SCULPTED)
+ // [FIRE-35428]
{
mFastCacheList.insert(imagep);
imagep->setInFastCacheList(true);