summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-09-01 18:06:15 -0500
committerDave Parks <davep@lindenlab.com>2022-09-01 18:06:15 -0500
commite0c226b04d6f2ac566a9ea5841509f7cdfa98c11 (patch)
tree8be65a806339611a57876f47a5062c89976ad3db /indra/newview/llmaterialeditor.cpp
parentd2d257cfa99b685160e16ed93c163018e9fe3c50 (diff)
SL-18078, SL-18065 -- Experimentally allow uploading of lossless normal maps, fix for crash on shutdown.
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r--indra/newview/llmaterialeditor.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index f05f0344bd..5acf0600b6 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -1059,24 +1059,39 @@ static void pack_textures(
LLPointer<LLImageJ2C>& mr_j2c,
LLPointer<LLImageJ2C>& emissive_j2c)
{
+ // NOTE : remove log spam and lossless vs lossy comparisons when the logs are no longer useful
+
if (albedo_img)
{
albedo_j2c = LLViewerTextureList::convertToUploadFile(albedo_img);
+ LL_INFOS() << "Albedo: " << albedo_j2c->getDataSize() << LL_ENDL;
}
if (normal_img)
{
normal_j2c = LLViewerTextureList::convertToUploadFile(normal_img);
+
+ LLPointer<LLImageJ2C> test;
+ test = LLViewerTextureList::convertToUploadFile(normal_img, 1024, true);
+
+ S32 lossy_bytes = normal_j2c->getDataSize();
+ S32 lossless_bytes = test->getDataSize();
+
+ LL_INFOS() << llformat("Lossless vs Lossy: (%d/%d) = %.2f", lossless_bytes, lossy_bytes, (F32)lossless_bytes / lossy_bytes) << LL_ENDL;
+
+ normal_j2c = test;
}
if (mr_img)
{
mr_j2c = LLViewerTextureList::convertToUploadFile(mr_img);
+ LL_INFOS() << "Metallic/Roughness: " << mr_j2c->getDataSize() << LL_ENDL;
}
if (emissive_img)
{
emissive_j2c = LLViewerTextureList::convertToUploadFile(emissive_img);
+ LL_INFOS() << "Emissive: " << emissive_j2c->getDataSize() << LL_ENDL;
}
}