A little bit of postprocess shader tinkering.

This commit is contained in:
Shyotl
2012-12-12 03:10:05 -06:00
parent c641cc6394
commit 2424d2a082
7 changed files with 340 additions and 185 deletions

View File

@@ -172,7 +172,8 @@ LLGLSLShader gPostNightVisionProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not
LLGLSLShader gPostGaussianBlurProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList
LLGLSLShader gPostPosterizeProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList
LLGLSLShader gPostMotionBlurProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList
LLGLSLShader gPostVignetteProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList
// Deferred rendering shaders
LLGLSLShader gDeferredImpostorProgram(LLViewerShaderMgr::SHADER_DEFERRED);
LLGLSLShader gDeferredWaterProgram(LLViewerShaderMgr::SHADER_DEFERRED); //calculatesAtmospherics
@@ -908,7 +909,6 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
shaderUniforms.push_back("contrast");
shaderUniforms.push_back("contrastBase");
shaderUniforms.push_back("saturation");
shaderUniforms.push_back("lumWeights");
gPostColorFilterProgram.mName = "Color Filter Shader (Post)";
gPostColorFilterProgram.mShaderFiles.clear();
@@ -929,7 +929,6 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
shaderUniforms.reserve(3);
shaderUniforms.push_back("brightMult");
shaderUniforms.push_back("noiseStrength");
shaderUniforms.push_back("lumWeights");
gPostNightVisionProgram.mName = "Night Vision Shader (Post)";
gPostNightVisionProgram.mShaderFiles.clear();
@@ -998,6 +997,26 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
gPostMotionBlurProgram.uniform1i("tex1", 1);
}
}
{
vector<string> shaderUniforms;
shaderUniforms.reserve(3);
shaderUniforms.push_back("vignette_darkness");
shaderUniforms.push_back("vignette_radius");
shaderUniforms.push_back("screen_res");
gPostVignetteProgram.mName = "Vignette Shader (Post)";
gPostVignetteProgram.mShaderFiles.clear();
gPostVignetteProgram.mShaderFiles.push_back(make_pair("effects/VignetteF.glsl", GL_FRAGMENT_SHADER_ARB));
gPostVignetteProgram.mShaderFiles.push_back(make_pair("interface/onetexturenocolorV.glsl", GL_VERTEX_SHADER_ARB));
gPostVignetteProgram.mShaderLevel = mVertexShaderLevel[SHADER_EFFECT];
if(gPostVignetteProgram.createShader(NULL, &shaderUniforms))
{
gPostVignetteProgram.bind();
gPostVignetteProgram.uniform1i("tex0", 0);
}
}
#endif
return success;