diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-05-02 10:05:13 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-05-02 10:16:54 -0700 |
commit | 54919fa7495910e6f7877228a0458736024dcdc4 (patch) | |
tree | 596b618effbffc54f81d12692001d3286502ab22 /indra/newview/llviewershadermgr.cpp | |
parent | 82311e4b44a863078fb1f47d56e9543abaae210c (diff) |
SL-17274: Stub for PBR DrawPool and shader
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 1cb2c6b9ee..50a0ff07fc 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -258,6 +258,7 @@ LLGLSLShader gNormalMapGenProgram; // Deferred materials shaders LLGLSLShader gDeferredMaterialProgram[LLMaterial::SHADER_COUNT*2]; LLGLSLShader gDeferredMaterialWaterProgram[LLMaterial::SHADER_COUNT*2]; +LLGLSLShader gDeferredPBROpaqueProgram; //helper for making a rigged variant of a given shader bool make_rigged_variant(LLGLSLShader& shader, LLGLSLShader& riggedShader) @@ -1300,6 +1301,9 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredMaterialProgram[i].unload(); gDeferredMaterialWaterProgram[i].unload(); } + + gDeferredPBROpaqueProgram.unload(); + return TRUE; } @@ -1584,6 +1588,22 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() success = gDeferredMaterialWaterProgram[i].createShader(NULL, NULL);//&mWLUniforms); llassert(success); } + + if (success) + { + gDeferredPBROpaqueProgram.mName = "Deferred PBR Opaque Shader"; + gDeferredPBROpaqueProgram.mFeatures.encodesNormal = true; + gDeferredPBROpaqueProgram.mFeatures.hasSrgb = true; + + gDeferredPBROpaqueProgram.mShaderFiles.clear(); + gDeferredPBROpaqueProgram.mShaderFiles.push_back(make_pair("deferred/pbropaqueV.glsl", GL_VERTEX_SHADER_ARB)); + gDeferredPBROpaqueProgram.mShaderFiles.push_back(make_pair("deferred/pbropaqueF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredPBROpaqueProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; + gDeferredPBROpaqueProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; + //gDeferredPBROpaqueProgram.addPermutation("HAS_NORMAL_MAP", "1"); + success = gDeferredPBROpaqueProgram.createShader(NULL, NULL); + llassert(success); + } } gDeferredMaterialProgram[1].mFeatures.hasLighting = true; |