diff options
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index d2acfa291c..2468aeffa2 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -212,7 +212,11 @@ LLGLSLShader gDeferredShadowProgram; LLGLSLShader gDeferredShadowCubeProgram; LLGLSLShader gDeferredShadowAlphaMaskProgram; LLGLSLShader gDeferredAvatarShadowProgram; +LLGLSLShader gDeferredAvatarAlphaShadowProgram; +LLGLSLShader gDeferredAvatarAlphaMaskShadowProgram; LLGLSLShader gDeferredAttachmentShadowProgram; +LLGLSLShader gDeferredAttachmentAlphaShadowProgram; +LLGLSLShader gDeferredAttachmentAlphaMaskShadowProgram; LLGLSLShader gDeferredAlphaProgram; LLGLSLShader gDeferredAlphaImpostorProgram; LLGLSLShader gDeferredAlphaWaterProgram; @@ -1836,6 +1840,30 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() success = gDeferredAvatarShadowProgram.createShader(NULL, NULL); } + 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 = mVertexShaderLevel[SHADER_DEFERRED]; + success = gDeferredAvatarAlphaShadowProgram.createShader(NULL, NULL); + } + + 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 = mVertexShaderLevel[SHADER_DEFERRED]; + success = gDeferredAvatarAlphaMaskShadowProgram.createShader(NULL, NULL); + } + if (success) { gDeferredAttachmentShadowProgram.mName = "Deferred Attachment Shadow Shader"; @@ -1847,6 +1875,30 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAttachmentShadowProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED]; success = gDeferredAttachmentShadowProgram.createShader(NULL, NULL); } + + 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 = mVertexShaderLevel[SHADER_DEFERRED]; + success = gDeferredAttachmentAlphaShadowProgram.createShader(NULL, NULL); + } + + 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 = mVertexShaderLevel[SHADER_DEFERRED]; + success = gDeferredAttachmentAlphaMaskShadowProgram.createShader(NULL, NULL); + } if (success) { |