From e81b149c4a24a8ade827e34fa600207cfa86fc7f Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Mon, 29 Aug 2022 17:34:49 -0700 Subject: Revert "SL-17703: PBR: Fix missing ORM to use 1,0,0" If ORM is blank the roughness and metal are multiplied into a default white ORM texture. This reverts commit 71ae65ae175a33c7f60442f62b0ef59415528bf5. --- indra/newview/lldrawpoolpbropaque.cpp | 2 +- indra/newview/llviewertexture.cpp | 11 +---------- indra/newview/llviewertexture.h | 1 - 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/indra/newview/lldrawpoolpbropaque.cpp b/indra/newview/lldrawpoolpbropaque.cpp index 35beafaa40..3930e11cf3 100644 --- a/indra/newview/lldrawpoolpbropaque.cpp +++ b/indra/newview/lldrawpoolpbropaque.cpp @@ -120,7 +120,7 @@ void LLDrawPoolPBROpaque::renderDeferred(S32 pass) } else { - shader->bindTexture(LLShaderMgr::SPECULAR_MAP, LLViewerTexture::sDefaultPBRORMImagep); // ORM 1,0,0 + shader->bindTexture(LLShaderMgr::SPECULAR_MAP, LLViewerFetchedTexture::sWhiteImagep); } if (pparams->mEmissiveMap) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 3ecab2c647..c389d2122e 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -69,7 +69,6 @@ const S32Megabytes gMaxVideoRam(512); LLPointer LLViewerTexture::sNullImagep = NULL; LLPointer LLViewerTexture::sBlackImagep = NULL; LLPointer LLViewerTexture::sCheckerBoardImagep = NULL; -LLPointer LLViewerTexture::sDefaultPBRORMImagep = NULL; // PBR: When ORM is missing use 1,0,0 LLPointer LLViewerFetchedTexture::sMissingAssetImagep = NULL; LLPointer LLViewerFetchedTexture::sWhiteImagep = NULL; LLPointer LLViewerFetchedTexture::sDefaultImagep = NULL; @@ -368,13 +367,6 @@ void LLViewerTextureManager::init() LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE); } - // Create Default PBR ORM Texture 1,0,0 - { - LLPointer red = new LLImageRaw(8,8,3); - red->clear(0xFF, 0x00, 0x00, 0xFF); - LLViewerTexture::sDefaultPBRORMImagep = LLViewerTextureManager::getLocalTexture(red.get(), TRUE); - } - const S32 dim = 128; LLPointer image_raw = new LLImageRaw(dim,dim,3); U8* data = image_raw->getData(); @@ -459,9 +451,8 @@ void LLViewerTextureManager::cleanup() LLImageGL::sDefaultGLTexture = NULL; LLViewerTexture::sNullImagep = NULL; LLViewerTexture::sBlackImagep = NULL; - LLViewerFetchedTexture::sDefaultPBRORMImagep = NULL; LLViewerTexture::sCheckerBoardImagep = NULL; - LLViewerFetchedTexture::sDefaultImagep = NULL; + LLViewerFetchedTexture::sDefaultImagep = NULL; LLViewerFetchedTexture::sSmokeImagep = NULL; LLViewerFetchedTexture::sMissingAssetImagep = NULL; LLTexUnit::sWhiteTexture = 0; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 89ded4ded7..53cf911102 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -252,7 +252,6 @@ public: static LLPointer sNullImagep; // Null texture for non-textured objects. static LLPointer sBlackImagep; // Texture to show NOTHING (pure black) static LLPointer sCheckerBoardImagep; // Texture to show NOTHING (pure black) - static LLPointer sDefaultPBRORMImagep; // PBR: When ORM is missing use 1,0,0 }; -- cgit v1.2.3