aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/app_settings/shaders/class3/effects/extractF.glsl
diff options
context:
space:
mode:
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}