diff options
author | Armin Weatherwax | 2010-09-07 13:41:02 +0200 |
---|---|---|
committer | Armin Weatherwax | 2010-09-23 15:42:40 +0200 |
commit | 087e15e89930d51c3964329befb273ae3b2d330d (patch) | |
tree | 684c49a772b0097ed88a25660e1fd3dd10b264cc /linden/indra/newview/app_settings/shaders/class3/effects/extractF.glsl | |
parent | Robin Cornelius: fixes for building plugins on Linux 64bit (diff) | |
download | meta-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.glsl | 22 |
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 | |||
8 | uniform sampler2DRect RenderTexture; | ||
9 | uniform float extractLow; | ||
10 | uniform float extractHigh; | ||
11 | uniform vec3 lumWeights; | ||
12 | |||
13 | void 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 | } | ||