diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2012-11-19 22:22:54 -0700 |
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2012-11-19 22:22:54 -0700 |
| commit | ed3d96069a5ecce17974812dbc9ab65ff8a6db4f (patch) | |
| tree | 2fdac0692c3caab1f5742b87069ccc4ddc7dbdb7 /indra/newview/llviewershadermgr.cpp | |
| parent | c2859e4663c405950b6f433270ae558852330c76 (diff) | |
for SH-3352: Create pixel shader to accumulate frame-to-frame absolute pixel differences
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
| -rw-r--r-- | indra/newview/llviewershadermgr.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 4b0e0598f6..5295573709 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -78,6 +78,7 @@ LLGLSLShader gGlowCombineProgram; LLGLSLShader gSplatTextureRectProgram; LLGLSLShader gGlowCombineFXAAProgram; LLGLSLShader gTwoTextureAddProgram; +LLGLSLShader gTwoTextureCompareProgram; LLGLSLShader gOneTextureNoColorProgram; LLGLSLShader gDebugProgram; LLGLSLShader gClipProgram; @@ -672,6 +673,7 @@ void LLViewerShaderMgr::unloadShaders() gSplatTextureRectProgram.unload(); gGlowCombineFXAAProgram.unload(); gTwoTextureAddProgram.unload(); + gTwoTextureCompareProgram.unload(); gOneTextureNoColorProgram.unload(); gSolidColorProgram.unload(); @@ -2708,6 +2710,22 @@ BOOL LLViewerShaderMgr::loadShadersInterface() if (success) { + gTwoTextureCompareProgram.mName = "Two Texture Compare Shader"; + gTwoTextureCompareProgram.mShaderFiles.clear(); + gTwoTextureCompareProgram.mShaderFiles.push_back(make_pair("interface/twotexturecompareV.glsl", GL_VERTEX_SHADER_ARB)); + gTwoTextureCompareProgram.mShaderFiles.push_back(make_pair("interface/twotexturecompareF.glsl", GL_FRAGMENT_SHADER_ARB)); + gTwoTextureCompareProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE]; + success = gTwoTextureCompareProgram.createShader(NULL, NULL); + if (success) + { + gTwoTextureCompareProgram.bind(); + gTwoTextureCompareProgram.uniform1i("tex0", 0); + gTwoTextureCompareProgram.uniform1i("tex1", 1); + } + } + + if (success) + { gOneTextureNoColorProgram.mName = "One Texture No Color Shader"; gOneTextureNoColorProgram.mShaderFiles.clear(); gOneTextureNoColorProgram.mShaderFiles.push_back(make_pair("interface/onetexturenocolorV.glsl", GL_VERTEX_SHADER_ARB)); |
