summaryrefslogtreecommitdiff
path: root/indra/newview/llviewershadermgr.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-02-09 17:00:36 -0600
committerDave Parks <davep@lindenlab.com>2023-02-09 17:00:36 -0600
commit577f6a46f02ecfa4efabc0b379e44e4f53a0b391 (patch)
tree6c55da64e3276ae5cfb3ea78e54b906d90234993 /indra/newview/llviewershadermgr.cpp
parent95de63eaa3bab44dc435d1448d0732d6ffe13544 (diff)
SL-19181 Modulate "glow" by PBR emissive.
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r--indra/newview/llviewershadermgr.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index ccb2a86128..2775a98869 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -206,6 +206,8 @@ LLGLSLShader gDeferredGenBrdfLutProgram;
LLGLSLShader gDeferredMaterialProgram[LLMaterial::SHADER_COUNT*2];
LLGLSLShader gDeferredMaterialWaterProgram[LLMaterial::SHADER_COUNT*2];
LLGLSLShader gHUDPBROpaqueProgram;
+LLGLSLShader gPBRGlowProgram;
+LLGLSLShader gPBRGlowSkinnedProgram;
LLGLSLShader gDeferredPBROpaqueProgram;
LLGLSLShader gDeferredSkinnedPBROpaqueProgram;
LLGLSLShader gHUDPBRAlphaProgram;
@@ -1016,6 +1018,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
}
gHUDPBROpaqueProgram.unload();
+ gPBRGlowProgram.unload();
gDeferredPBROpaqueProgram.unload();
gDeferredSkinnedPBROpaqueProgram.unload();
gDeferredPBRAlphaProgram.unload();
@@ -1327,6 +1330,23 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
+ gPBRGlowProgram.mName = " PBR Glow Shader";
+ gPBRGlowProgram.mFeatures.hasSrgb = true;
+ gPBRGlowProgram.mShaderFiles.clear();
+ gPBRGlowProgram.mShaderFiles.push_back(make_pair("deferred/pbrglowV.glsl", GL_VERTEX_SHADER));
+ gPBRGlowProgram.mShaderFiles.push_back(make_pair("deferred/pbrglowF.glsl", GL_FRAGMENT_SHADER));
+ gPBRGlowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+
+ success = make_rigged_variant(gPBRGlowProgram, gPBRGlowSkinnedProgram);
+ if (success)
+ {
+ success = gPBRGlowProgram.createShader(NULL, NULL);
+ }
+ llassert(success);
+ }
+
+ if (success)
+ {
gHUDPBROpaqueProgram.mName = "HUD PBR Opaque Shader";
gHUDPBROpaqueProgram.mFeatures.hasSrgb = true;
gHUDPBROpaqueProgram.mShaderFiles.clear();
@@ -1341,6 +1361,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
llassert(success);
}
+
+
if (success)
{
LLGLSLShader* shader = &gDeferredPBRAlphaProgram;