summaryrefslogtreecommitdiff
path: root/indra/llrender/llpostprocess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llpostprocess.cpp')
-rw-r--r--indra/llrender/llpostprocess.cpp132
1 files changed, 0 insertions, 132 deletions
diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp
index f1e5b71207..0f8655132b 100644
--- a/indra/llrender/llpostprocess.cpp
+++ b/indra/llrender/llpostprocess.cpp
@@ -230,35 +230,7 @@ void LLPostProcess::applyShaders(void)
void LLPostProcess::applyColorFilterShader(void)
{
- /* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender.
- gPostColorFilterProgram.bind();
-
- gGL.getTexUnit(0)->activate();
- gGL.getTexUnit(0)->enable(LLTexUnit::TT_RECT_TEXTURE);
-
- gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, sceneRenderTexture);
-
- getShaderUniforms(colorFilterUniforms, gPostColorFilterProgram.mProgramObject);
- glUniform1i(colorFilterUniforms["RenderTexture"], 0);
- glUniform1f(colorFilterUniforms["brightness"], tweaks.getBrightness());
- glUniform1f(colorFilterUniforms["contrast"], tweaks.getContrast());
- float baseI = (tweaks.getContrastBaseR() + tweaks.getContrastBaseG() + tweaks.getContrastBaseB()) / 3.0f;
- baseI = tweaks.getContrastBaseIntensity() / ((baseI < 0.001f) ? 0.001f : baseI);
- float baseR = tweaks.getContrastBaseR() * baseI;
- float baseG = tweaks.getContrastBaseG() * baseI;
- float baseB = tweaks.getContrastBaseB() * baseI;
- glUniform3f(colorFilterUniforms["contrastBase"], baseR, baseG, baseB);
- glUniform1f(colorFilterUniforms["saturation"], tweaks.getSaturation());
- glUniform3f(colorFilterUniforms["lumWeights"], LUMINANCE_R, LUMINANCE_G, LUMINANCE_B);
- LLGLEnable blend(GL_BLEND);
- gGL.setSceneBlendType(LLRender::BT_REPLACE);
- LLGLDepthTest depth(GL_FALSE);
-
- /// Draw a screen space quad
- drawOrthoQuad(screenW, screenH, QUAD_NORMAL);
- gPostColorFilterProgram.unbind();
- */
}
void LLPostProcess::createColorFilterShader(void)
@@ -274,40 +246,7 @@ void LLPostProcess::createColorFilterShader(void)
void LLPostProcess::applyNightVisionShader(void)
{
- /* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender.
- gPostNightVisionProgram.bind();
-
- gGL.getTexUnit(0)->activate();
- gGL.getTexUnit(0)->enable(LLTexUnit::TT_RECT_TEXTURE);
-
- getShaderUniforms(nightVisionUniforms, gPostNightVisionProgram.mProgramObject);
- gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, sceneRenderTexture);
- glUniform1i(nightVisionUniforms["RenderTexture"], 0);
-
- gGL.getTexUnit(1)->activate();
- gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE);
-
- gGL.getTexUnit(1)->bindManual(LLTexUnit::TT_TEXTURE, noiseTexture);
- glUniform1i(nightVisionUniforms["NoiseTexture"], 1);
-
-
- glUniform1f(nightVisionUniforms["brightMult"], tweaks.getBrightMult());
- glUniform1f(nightVisionUniforms["noiseStrength"], tweaks.getNoiseStrength());
- noiseTextureScale = 0.01f + ((101.f - tweaks.getNoiseSize()) / 100.f);
- noiseTextureScale *= (screenH / NOISE_SIZE);
-
-
- glUniform3f(nightVisionUniforms["lumWeights"], LUMINANCE_R, LUMINANCE_G, LUMINANCE_B);
- LLGLEnable blend(GL_BLEND);
- gGL.setSceneBlendType(LLRender::BT_REPLACE);
- LLGLDepthTest depth(GL_FALSE);
-
- /// Draw a screen space quad
- drawOrthoQuad(screenW, screenH, QUAD_NOISE);
- gPostNightVisionProgram.unbind();
- gGL.getTexUnit(0)->activate();
- */
}
void LLPostProcess::createNightVisionShader(void)
@@ -396,78 +335,7 @@ void LLPostProcess::copyFrameBuffer(U32 & texture, unsigned int width, unsigned
void LLPostProcess::drawOrthoQuad(unsigned int width, unsigned int height, QuadType type)
{
-#if 0
- float noiseX = 0.f;
- float noiseY = 0.f;
- float screenRatio = 1.0f;
-
- if (type == QUAD_NOISE){
- noiseX = ((float) rand() / (float) RAND_MAX);
- noiseY = ((float) rand() / (float) RAND_MAX);
- screenRatio = (float) width / (float) height;
- }
-
-
- glBegin(GL_QUADS);
- if (type != QUAD_BLOOM_EXTRACT){
- glMultiTexCoord2f(GL_TEXTURE0, 0.f, (GLfloat) height);
- } else {
- glMultiTexCoord2f(GL_TEXTURE0, 0.f, (GLfloat) height * 2.0f);
- }
- if (type == QUAD_NOISE){
- glMultiTexCoord2f(GL_TEXTURE1,
- noiseX,
- noiseTextureScale + noiseY);
- } else if (type == QUAD_BLOOM_COMBINE){
- glMultiTexCoord2f(GL_TEXTURE1, 0.f, (GLfloat) height * 0.5f);
- }
- glVertex2f(0.f, (GLfloat) screenH - height);
-
- if (type != QUAD_BLOOM_EXTRACT){
- glMultiTexCoord2f(GL_TEXTURE0, 0.f, 0.f);
- } else {
- glMultiTexCoord2f(GL_TEXTURE0, 0.f, 0.f);
- }
- if (type == QUAD_NOISE){
- glMultiTexCoord2f(GL_TEXTURE1,
- noiseX,
- noiseY);
- } else if (type == QUAD_BLOOM_COMBINE){
- glMultiTexCoord2f(GL_TEXTURE1, 0.f, 0.f);
- }
- glVertex2f(0.f, (GLfloat) height + (screenH - height));
-
- if (type != QUAD_BLOOM_EXTRACT){
- glMultiTexCoord2f(GL_TEXTURE0, (GLfloat) width, 0.f);
- } else {
- glMultiTexCoord2f(GL_TEXTURE0, (GLfloat) width * 2.0f, 0.f);
- }
- if (type == QUAD_NOISE){
- glMultiTexCoord2f(GL_TEXTURE1,
- screenRatio * noiseTextureScale + noiseX,
- noiseY);
- } else if (type == QUAD_BLOOM_COMBINE){
- glMultiTexCoord2f(GL_TEXTURE1, (GLfloat) width * 0.5f, 0.f);
- }
- glVertex2f((GLfloat) width, (GLfloat) height + (screenH - height));
-
-
- if (type != QUAD_BLOOM_EXTRACT){
- glMultiTexCoord2f(GL_TEXTURE0, (GLfloat) width, (GLfloat) height);
- } else {
- glMultiTexCoord2f(GL_TEXTURE0, (GLfloat) width * 2.0f, (GLfloat) height * 2.0f);
- }
- if (type == QUAD_NOISE){
- glMultiTexCoord2f(GL_TEXTURE1,
- screenRatio * noiseTextureScale + noiseX,
- noiseTextureScale + noiseY);
- } else if (type == QUAD_BLOOM_COMBINE){
- glMultiTexCoord2f(GL_TEXTURE1, (GLfloat) width * 0.5f, (GLfloat) height * 0.5f);
- }
- glVertex2f((GLfloat) width, (GLfloat) screenH - height);
- glEnd();
-#endif
}
void LLPostProcess::viewOrthogonal(unsigned int width, unsigned int height)