summaryrefslogtreecommitdiff
path: root/indra/newview/llviewershadermgr.cpp
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-02-23 10:58:39 -0800
committerCosmic Linden <cosmic@lindenlab.com>2023-02-23 14:28:42 -0800
commit6494eed242b1cf64160e379c6d40df333deae23a (patch)
tree2ab6194d6cf1fcec77b2d28827753038f5d2bfb7 /indra/newview/llviewershadermgr.cpp
parentd1531eb2cec851e663e1bdde2e2858a939a6cb81 (diff)
SL-19228: Fix GLTF texture transform rotation and add UV debug (PBR only). See textureUtilV.glsl for UV coordinate comments
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r--indra/newview/llviewershadermgr.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 5d3da55499..b866cedaaa 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -653,6 +653,7 @@ std::string LLViewerShaderMgr::loadBasicShaders()
shaders.push_back( make_pair( "environment/srgbF.glsl", 1 ) );
shaders.push_back( make_pair( "avatar/avatarSkinV.glsl", 1 ) );
shaders.push_back( make_pair( "avatar/objectSkinV.glsl", 1 ) );
+ shaders.push_back( make_pair( "deferred/textureUtilV.glsl", 1 ) );
if (gGLManager.mGLSLVersionMajor >= 2 || gGLManager.mGLSLVersionMinor >= 30)
{
shaders.push_back( make_pair( "objects/indexedTextureV.glsl", 1 ) );
@@ -1319,6 +1320,11 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredPBROpaqueProgram.mShaderFiles.push_back(make_pair("deferred/pbropaqueV.glsl", GL_VERTEX_SHADER));
gDeferredPBROpaqueProgram.mShaderFiles.push_back(make_pair("deferred/pbropaqueF.glsl", GL_FRAGMENT_SHADER));
gDeferredPBROpaqueProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+ gDeferredPBROpaqueProgram.clearPermutations();
+ if (gSavedSettings.getBOOL("RenderDebugTexcoord"))
+ {
+ gDeferredPBROpaqueProgram.addPermutation("DEBUG_TEXCOORD", "1");
+ }
success = make_rigged_variant(gDeferredPBROpaqueProgram, gDeferredSkinnedPBROpaqueProgram);
if (success)
@@ -1355,6 +1361,10 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gHUDPBROpaqueProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
gHUDPBROpaqueProgram.clearPermutations();
gHUDPBROpaqueProgram.addPermutation("IS_HUD", "1");
+ if (gSavedSettings.getBOOL("RenderDebugTexcoord"))
+ {
+ gHUDPBROpaqueProgram.addPermutation("DEBUG_TEXCOORD", "1");
+ }
success = gHUDPBROpaqueProgram.createShader(NULL, NULL);
@@ -1398,6 +1408,10 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
{
shader->addPermutation("HAS_SUN_SHADOW", "1");
}
+ if (gSavedSettings.getBOOL("RenderDebugTexcoord"))
+ {
+ shader->addPermutation("DEBUG_TEXCOORD", "1");
+ }
shader->mShaderLevel = mShaderLevel[SHADER_DEFERRED];
success = make_rigged_variant(*shader, gDeferredSkinnedPBRAlphaProgram);
@@ -1430,6 +1444,10 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader->clearPermutations();
shader->addPermutation("IS_HUD", "1");
+ if (gSavedSettings.getBOOL("RenderDebugTexcoord"))
+ {
+ shader->addPermutation("DEBUG_TEXCOORD", "1");
+ }
shader->mShaderLevel = mShaderLevel[SHADER_DEFERRED];
success = shader->createShader(NULL, NULL);