diff options
author | Graham Linden <graham@lindenlab.com> | 2019-04-03 12:01:34 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-04-03 12:01:34 -0700 |
commit | 98f71bb8e4cd94c29a1b728147d8507f3a74c3a2 (patch) | |
tree | d8eaedaae11ca8b5b30a157b6d7ec279ef7feec2 /indra/newview | |
parent | ed12bb1c77b957ac00fd1a9d73d4d9aa93bd7f78 (diff) |
Replace dropped code from 6.1.2 for loading new avatar/attachment alpha/mask shadow shaders.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 28593a43ba..dc38339e6e 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -2220,6 +2220,32 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() if (success) { + gDeferredAvatarAlphaShadowProgram.mName = "Deferred Avatar Alpha Shadow Shader"; + gDeferredAvatarAlphaShadowProgram.mFeatures.hasSkinning = true; + gDeferredAvatarAlphaShadowProgram.mShaderFiles.clear(); + gDeferredAvatarAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaShadowV.glsl", GL_VERTEX_SHADER_ARB)); + gDeferredAvatarAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAvatarAlphaShadowProgram.addPermutation("DEPTH_CLAMP", gGLManager.mHasDepthClamp ? "1" : "0"); + gDeferredAvatarAlphaShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; + success = gDeferredAvatarAlphaShadowProgram.createShader(NULL, NULL); + llassert(success); + } + + if (success) + { + gDeferredAvatarAlphaMaskShadowProgram.mName = "Deferred Avatar Alpha Mask Shadow Shader"; + gDeferredAvatarAlphaMaskShadowProgram.mFeatures.hasSkinning = true; + gDeferredAvatarAlphaMaskShadowProgram.mShaderFiles.clear(); + gDeferredAvatarAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaShadowV.glsl", GL_VERTEX_SHADER_ARB)); + gDeferredAvatarAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaMaskShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAvatarAlphaMaskShadowProgram.addPermutation("DEPTH_CLAMP", gGLManager.mHasDepthClamp ? "1" : "0"); + gDeferredAvatarAlphaMaskShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; + success = gDeferredAvatarAlphaMaskShadowProgram.createShader(NULL, NULL); + llassert(success); + } + + if (success) + { gDeferredAttachmentShadowProgram.mName = "Deferred Attachment Shadow Shader"; gDeferredAttachmentShadowProgram.mFeatures.hasObjectSkinning = true; @@ -2237,6 +2263,32 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() if (success) { + gDeferredAttachmentAlphaShadowProgram.mName = "Deferred Attachment Alpha Shadow Shader"; + gDeferredAttachmentAlphaShadowProgram.mFeatures.hasObjectSkinning = true; + gDeferredAttachmentAlphaShadowProgram.mShaderFiles.clear(); + gDeferredAttachmentAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaShadowV.glsl", GL_VERTEX_SHADER_ARB)); + gDeferredAttachmentAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAttachmentAlphaShadowProgram.addPermutation("DEPTH_CLAMP", gGLManager.mHasDepthClamp ? "1" : "0"); + gDeferredAttachmentAlphaShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; + success = gDeferredAttachmentAlphaShadowProgram.createShader(NULL, NULL); + llassert(success); + } + + if (success) + { + gDeferredAttachmentAlphaMaskShadowProgram.mName = "Deferred Attachment Alpha Mask Shadow Shader"; + gDeferredAttachmentAlphaMaskShadowProgram.mFeatures.hasObjectSkinning = true; + gDeferredAttachmentAlphaMaskShadowProgram.mShaderFiles.clear(); + gDeferredAttachmentAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaShadowV.glsl", GL_VERTEX_SHADER_ARB)); + gDeferredAttachmentAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaMaskShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAttachmentAlphaMaskShadowProgram.addPermutation("DEPTH_CLAMP", gGLManager.mHasDepthClamp ? "1" : "0"); + gDeferredAttachmentAlphaMaskShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; + success = gDeferredAttachmentAlphaMaskShadowProgram.createShader(NULL, NULL); + llassert(success); + } + + if (success) + { gDeferredTerrainProgram.mName = "Deferred Terrain Shader"; gDeferredTerrainProgram.mFeatures.encodesNormal = true; gDeferredTerrainProgram.mFeatures.hasSrgb = true; @@ -2280,6 +2332,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredTerrainWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; gDeferredTerrainWaterProgram.addPermutation("WATER_FOG", "1"); success = gDeferredTerrainWaterProgram.createShader(NULL, NULL); + llassert(success); } if (success) |