aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/app_settings/shaders/class3/effects/extractF.glsl
diff options
context:
space:
mode:
authorArmin Weatherwax2010-09-07 13:41:02 +0200
committerArmin Weatherwax2010-09-23 15:42:40 +0200
commit087e15e89930d51c3964329befb273ae3b2d330d (patch)
tree684c49a772b0097ed88a25660e1fd3dd10b264cc /linden/indra/newview/app_settings/shaders/class3/effects/extractF.glsl
parentRobin Cornelius: fixes for building plugins on Linux 64bit (diff)
downloadmeta-impy-087e15e89930d51c3964329befb273ae3b2d330d.zip
meta-impy-087e15e89930d51c3964329befb273ae3b2d330d.tar.gz
meta-impy-087e15e89930d51c3964329befb273ae3b2d330d.tar.bz2
meta-impy-087e15e89930d51c3964329befb273ae3b2d330d.tar.xz
port of LL renderpipeline/Kirstens S19 pipeline for bridging to Viewer 2 texture system
Diffstat (limited to 'linden/indra/newview/app_settings/shaders/class3/effects/extractF.glsl')
-rw-r--r--linden/indra/newview/app_settings/shaders/class3/effects/extractF.glsl22
1 files changed, 22 insertions, 0 deletions
diff --git a/linden/indra/newview/app_settings/shaders/class3/effects/extractF.glsl b/linden/indra/newview/app_settings/shaders/class3/effects/extractF.glsl
new file mode 100644
index 0000000..a1583b1
--- /dev/null
+++ b/linden/indra/newview/app_settings/shaders/class3/effects/extractF.glsl
@@ -0,0 +1,22 @@
1/**
2 * @file extractF.glsl
3 *
4 * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
5 * $License$
6 */
7
8uniform sampler2DRect RenderTexture;
9uniform float extractLow;
10uniform float extractHigh;
11uniform vec3 lumWeights;
12
13void main(void)
14{
15 /// Get scene color
16 vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st));
17
18 /// Extract luminance and scale up by night vision brightness
19 float lum = smoothstep(extractLow, extractHigh, dot(color, lumWeights));
20
21 gl_FragColor = vec4(vec3(lum), 1.0);
22}