diff options
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 7155311f8e..23351fc994 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -70,6 +70,7 @@ LLGLSLShader gGlowCombineFXAAProgram; LLGLSLShader gTwoTextureAddProgram; LLGLSLShader gOneTextureNoColorProgram; LLGLSLShader gDebugProgram; +LLGLSLShader gAlphaMaskProgram; //object shaders LLGLSLShader gObjectSimpleProgram; @@ -219,6 +220,7 @@ LLViewerShaderMgr::LLViewerShaderMgr() : mShaderList.push_back(&gSolidColorProgram); mShaderList.push_back(&gOcclusionProgram); mShaderList.push_back(&gDebugProgram); + mShaderList.push_back(&gAlphaMaskProgram); mShaderList.push_back(&gObjectEmissiveProgram); mShaderList.push_back(&gObjectEmissiveWaterProgram); mShaderList.push_back(&gObjectFullbrightProgram); @@ -674,6 +676,7 @@ void LLViewerShaderMgr::unloadShaders() { gOcclusionProgram.unload(); gDebugProgram.unload(); + gAlphaMaskProgram.unload(); gUIProgram.unload(); gCustomAlphaProgram.unload(); gGlowCombineProgram.unload(); @@ -2747,6 +2750,16 @@ BOOL LLViewerShaderMgr::loadShadersInterface() success = gDebugProgram.createShader(NULL, NULL); } + if (success) + { + gAlphaMaskProgram.mName = "Alpha Mask Shader"; + gAlphaMaskProgram.mShaderFiles.clear(); + gAlphaMaskProgram.mShaderFiles.push_back(make_pair("interface/alphamaskV.glsl", GL_VERTEX_SHADER_ARB)); + gAlphaMaskProgram.mShaderFiles.push_back(make_pair("interface/alphamaskF.glsl", GL_FRAGMENT_SHADER_ARB)); + gAlphaMaskProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE]; + success = gAlphaMaskProgram.createShader(NULL, NULL); + } + if( !success ) { mVertexShaderLevel[SHADER_INTERFACE] = 0; |