diff options
Diffstat (limited to 'linden/indra/newview/app_settings/shaders/class2/effects/blurV.glsl')
-rw-r--r-- | linden/indra/newview/app_settings/shaders/class2/effects/blurV.glsl | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/linden/indra/newview/app_settings/shaders/class2/effects/blurV.glsl b/linden/indra/newview/app_settings/shaders/class2/effects/blurV.glsl new file mode 100644 index 0000000..ba65b16 --- /dev/null +++ b/linden/indra/newview/app_settings/shaders/class2/effects/blurV.glsl | |||
@@ -0,0 +1,35 @@ | |||
1 | /** | ||
2 | * @file blurV.glsl | ||
3 | * | ||
4 | * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. | ||
5 | * $License$ | ||
6 | */ | ||
7 | |||
8 | uniform vec2 texelSize; | ||
9 | uniform vec2 blurDirection; | ||
10 | uniform float blurWidth; | ||
11 | |||
12 | void main(void) | ||
13 | { | ||
14 | // Transform vertex | ||
15 | gl_Position = ftransform(); | ||
16 | |||
17 | vec2 blurDelta = texelSize * blurDirection * vec2(blurWidth, blurWidth); | ||
18 | vec2 s = gl_MultiTexCoord0.st - (blurDelta * 3.0); | ||
19 | |||
20 | // for (int i = 0; i < 7; i++) { | ||
21 | // gl_TexCoord[i].st = s + (i * blurDelta); | ||
22 | // } | ||
23 | |||
24 | // MANUALLY UNROLL | ||
25 | gl_TexCoord[0].st = s; | ||
26 | gl_TexCoord[1].st = s + blurDelta; | ||
27 | gl_TexCoord[2].st = s + (2. * blurDelta); | ||
28 | gl_TexCoord[3].st = s + (3. * blurDelta); | ||
29 | gl_TexCoord[4].st = s + (4. * blurDelta); | ||
30 | gl_TexCoord[5].st = s + (5. * blurDelta); | ||
31 | gl_TexCoord[6].st = s + (6. * blurDelta); | ||
32 | |||
33 | // gl_TexCoord[0].st = s; | ||
34 | // gl_TexCoord[1].st = blurDelta; | ||
35 | } | ||