summaryrefslogtreecommitdiff
path: root/indra/newview/llviewershadermgr.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-09-17 01:12:52 -0500
committerDave Parks <davep@lindenlab.com>2022-09-17 01:12:52 -0500
commitb2cf07f53ca9f0ab82d466063af8307631c50f31 (patch)
treeb0d9d4709ca926cbb49b53f4483bdf6b5bad62ff /indra/newview/llviewershadermgr.cpp
parentdc1ed195119d9ccc2b21111ea16663ffce4942c8 (diff)
WIP - switch PBR implementations
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r--indra/newview/llviewershadermgr.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 296a383ed0..63d9a03aba 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -252,6 +252,7 @@ LLGLSLShader gDeferredSkinnedFullbrightShinyProgram;
LLGLSLShader gDeferredSkinnedFullbrightProgram;
LLGLSLShader gDeferredSkinnedFullbrightAlphaMaskProgram;
LLGLSLShader gNormalMapGenProgram;
+LLGLSLShader gDeferredGenBrdfLutProgram;
// Deferred materials shaders
LLGLSLShader gDeferredMaterialProgram[LLMaterial::SHADER_COUNT*2];
@@ -1244,6 +1245,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredHighlightSpecularProgram.unload();
gNormalMapGenProgram.unload();
+ gDeferredGenBrdfLutProgram.unload();
+
for (U32 i = 0; i < LLMaterial::SHADER_COUNT*2; ++i)
{
gDeferredMaterialProgram[i].unload();
@@ -2855,6 +2858,17 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
success = gNormalMapGenProgram.createShader(NULL, NULL);
}
+ if (success && gGLManager.mHasCubeMapArray)
+ {
+ gDeferredGenBrdfLutProgram.mName = "Brdf Gen Shader";
+ gDeferredGenBrdfLutProgram.mShaderFiles.clear();
+ gDeferredGenBrdfLutProgram.mShaderFiles.push_back(make_pair("deferred/genbrdflutV.glsl", GL_VERTEX_SHADER));
+ gDeferredGenBrdfLutProgram.mShaderFiles.push_back(make_pair("deferred/genbrdflutF.glsl", GL_FRAGMENT_SHADER));
+ gDeferredGenBrdfLutProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+ success = gDeferredGenBrdfLutProgram.createShader(NULL, NULL);
+ }
+
+
return success;
}