diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/effects')
7 files changed, 0 insertions, 203 deletions
diff --git a/indra/newview/app_settings/shaders/class2/effects/blurF.glsl b/indra/newview/app_settings/shaders/class2/effects/blurF.glsl deleted file mode 100644 index dff4d4a68f..0000000000 --- a/indra/newview/app_settings/shaders/class2/effects/blurF.glsl +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file blurf.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * $/LicenseInfo$ - */ - - - -uniform sampler2DRect RenderTexture; -uniform float bloomStrength; - -varying vec4 gl_TexCoord[gl_MaxTextureCoords]; -void main(void) -{ - float blurWeights[7]; - blurWeights[0] = 0.05; - blurWeights[1] = 0.1; - blurWeights[2] = 0.2; - blurWeights[3] = 0.3; - blurWeights[4] = 0.2; - blurWeights[5] = 0.1; - blurWeights[6] = 0.05; - - vec3 color = vec3(0,0,0); - for (int i = 0; i < 7; i++){ - color += vec3(texture2DRect(RenderTexture, gl_TexCoord[i].st)) * blurWeights[i]; - } - - color *= bloomStrength; - - gl_FragColor = vec4(color, 1.0); -} diff --git a/indra/newview/app_settings/shaders/class2/effects/blurV.glsl b/indra/newview/app_settings/shaders/class2/effects/blurV.glsl deleted file mode 100644 index de469542f9..0000000000 --- a/indra/newview/app_settings/shaders/class2/effects/blurV.glsl +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file blurV.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * $/LicenseInfo$ - */ - - - -uniform vec2 texelSize; -uniform vec2 blurDirection; -uniform float blurWidth; - -void main(void) -{ - // Transform vertex - gl_Position = ftransform(); - - vec2 blurDelta = texelSize * blurDirection * vec2(blurWidth, blurWidth); - vec2 s = gl_MultiTexCoord0.st - (blurDelta * 3.0); - - // for (int i = 0; i < 7; i++) { - // gl_TexCoord[i].st = s + (i * blurDelta); - // } - - // MANUALLY UNROLL - gl_TexCoord[0].st = s; - gl_TexCoord[1].st = s + blurDelta; - gl_TexCoord[2].st = s + (2. * blurDelta); - gl_TexCoord[3].st = s + (3. * blurDelta); - gl_TexCoord[4].st = s + (4. * blurDelta); - gl_TexCoord[5].st = s + (5. * blurDelta); - gl_TexCoord[6].st = s + (6. * blurDelta); - - // gl_TexCoord[0].st = s; - // gl_TexCoord[1].st = blurDelta; -} diff --git a/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl b/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl deleted file mode 100644 index 8871bb3fc7..0000000000 --- a/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file colorFilterF.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * $/LicenseInfo$ - */ - - - -uniform sampler2DRect RenderTexture; -uniform float brightness; -uniform float contrast; -uniform vec3 contrastBase; -uniform float saturation; -uniform vec3 lumWeights; - -const float gamma = 2.0; - -void main(void) -{ - vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st)); - - /// Modulate brightness - color *= brightness; - - /// Modulate contrast - color = mix(contrastBase, color, contrast); - - /// Modulate saturation - color = mix(vec3(dot(color, lumWeights)), color, saturation); - - gl_FragColor = vec4(color, 1.0); -} diff --git a/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl b/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl deleted file mode 100644 index 9c52b8dd5d..0000000000 --- a/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @file drawQuadV.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * $/LicenseInfo$ - */ - - - -void main(void) -{ - //transform vertex - gl_Position = ftransform(); - gl_TexCoord[0] = gl_MultiTexCoord0; - gl_TexCoord[1] = gl_MultiTexCoord1; -} diff --git a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl deleted file mode 100644 index 713f8021de..0000000000 --- a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file extractF.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * $/LicenseInfo$ - */ - - - -uniform sampler2DRect RenderTexture; -uniform float extractLow; -uniform float extractHigh; -uniform vec3 lumWeights; - -void main(void) -{ - /// Get scene color - vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st)); - - /// Extract luminance and scale up by night vision brightness - float lum = smoothstep(extractLow, extractHigh, dot(color, lumWeights)); - - gl_FragColor = vec4(vec3(lum), 1.0); -} diff --git a/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl b/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl deleted file mode 100644 index fd94b2e95f..0000000000 --- a/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @file nightVisionF.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * $/LicenseInfo$ - */ - - - -uniform sampler2DRect RenderTexture; -uniform sampler2D NoiseTexture; -uniform float brightMult; -uniform float noiseStrength; - -float luminance(vec3 color) -{ - /// CALCULATING LUMINANCE (Using NTSC lum weights) - /// http://en.wikipedia.org/wiki/Luma_%28video%29 - return dot(color, vec3(0.299, 0.587, 0.114)); -} - -void main(void) -{ - /// Get scene color - vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st)); - - /// Extract luminance and scale up by night vision brightness - float lum = luminance(color) * brightMult; - - /// Convert into night vision color space - /// Newer NVG colors (crisper and more saturated) - vec3 outColor = (lum * vec3(0.91, 1.21, 0.9)) + vec3(-0.07, 0.1, -0.12); - - /// Add noise - float noiseValue = texture2D(NoiseTexture, gl_TexCoord[1].st).r; - noiseValue = (noiseValue - 0.5) * noiseStrength; - - /// Older NVG colors (more muted) - // vec3 outColor = (lum * vec3(0.82, 0.75, 0.83)) + vec3(0.05, 0.32, -0.11); - - outColor += noiseValue; - - gl_FragColor = vec4(outColor, 1.0); -} diff --git a/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl b/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl deleted file mode 100644 index a1a9c9716c..0000000000 --- a/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @file simpleF.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * $/LicenseInfo$ - */ - - - -uniform sampler2DRect RenderTexture; - -void main(void) -{ - vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st)); - gl_FragColor = vec4(1.0 - color, 1.0); -} |