diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-11-15 14:32:30 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-11-15 14:32:30 +0800 |
commit | d17cea8d53cd2bc253d30228f6d2e0abcd59701b (patch) | |
tree | 0d3e9669c07083b74e6a46693372db655dd67d79 /indra/newview | |
parent | 48af6d43580e07ea2b6833b6d44279bdd3f3e70d (diff) | |
parent | 843866d193a0fb5ea882408c8862335ab9c5539b (diff) |
Merge remote-tracking branch 'secondlife/DRTVWR-559' into DRTVWR-559
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 14 |
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) |