summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-11-13 13:12:48 -0600
committerGitHub <noreply@github.com>2023-11-13 13:12:48 -0600
commit843866d193a0fb5ea882408c8862335ab9c5539b (patch)
tree62375c861df79d64bd8a6e5c884075d5d0f59388 /indra/newview/llmaterialeditor.cpp
parentafa45530f745af8c9d595948ac957b12664cca2c (diff)
Drtvwr 596 11/8/2023 (#501)
* SL-20570 Fix for lossy (and square) normal maps when importing GLTF materials. * SL-20582 Fix for overriding to alpha mode blend not working. Incidental decruft of dead code (thanks, Rye!)
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r--indra/newview/llmaterialeditor.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 11a528314e..a5437f7a88 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -1840,17 +1840,9 @@ static void pack_textures(
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_DEBUGS("MaterialEditor") << llformat("Lossless vs Lossy: (%d/%d) = %.2f", lossless_bytes, lossy_bytes, (F32)lossless_bytes / lossy_bytes) << LL_ENDL;
-
- normal_j2c = test;
+ // create a losslessly compressed version of the normal map
+ normal_j2c = LLViewerTextureList::convertToUploadFile(normal_img, 1024, false, true);
+ LL_DEBUGS("MaterialEditor") << "Normal: " << normal_j2c->getDataSize() << LL_ENDL;
}
if (mr_img)