summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-06-13 11:45:54 -0400
committerOz Linden <oz@lindenlab.com>2013-06-13 11:45:54 -0400
commit1f2125cc1263bda3352e195654f963777d9926a6 (patch)
treeb5d6b08a83b8e2807e08b2730bff4dcff96f3e8d /indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
parent7ad631e6eabaf48f33f4808293ed7ffde8240adb (diff)
correct DOS line endings
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl')
-rwxr-xr-xindra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl64
1 files changed, 32 insertions, 32 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
index cfce215faf..01e34ed792 100755
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
@@ -66,38 +66,38 @@ uniform float shadow_offset;
uniform float spot_shadow_bias;
uniform float spot_shadow_offset;
-#ifdef SINGLE_FP_ONLY
-vec2 encode_normal(vec3 n)
-{
- vec2 sn;
- sn.xy = (n.xy * vec2(0.5f,0.5f)) + vec2(0.5f,0.5f);
- return sn;
-}
-
-vec3 decode_normal (vec2 enc)
-{
- vec3 n;
- n.xy = (enc.xy * vec2(2.0f,2.0f)) - vec2(1.0f,1.0f);
- n.z = sqrt(1.0f - dot(n.xy,n.xy));
- return n;
-}
-#else
-vec2 encode_normal(vec3 n)
-{
- float f = sqrt(8 * n.z + 8);
- return n.xy / f + 0.5;
-}
-
-vec3 decode_normal (vec2 enc)
-{
- vec2 fenc = enc*4-2;
- float f = dot(fenc,fenc);
- float g = sqrt(1-f/4);
- vec3 n;
- n.xy = fenc*g;
- n.z = 1-f/2;
- return n;
-}
+#ifdef SINGLE_FP_ONLY
+vec2 encode_normal(vec3 n)
+{
+ vec2 sn;
+ sn.xy = (n.xy * vec2(0.5f,0.5f)) + vec2(0.5f,0.5f);
+ return sn;
+}
+
+vec3 decode_normal (vec2 enc)
+{
+ vec3 n;
+ n.xy = (enc.xy * vec2(2.0f,2.0f)) - vec2(1.0f,1.0f);
+ n.z = sqrt(1.0f - dot(n.xy,n.xy));
+ return n;
+}
+#else
+vec2 encode_normal(vec3 n)
+{
+ float f = sqrt(8 * n.z + 8);
+ return n.xy / f + 0.5;
+}
+
+vec3 decode_normal (vec2 enc)
+{
+ vec2 fenc = enc*4-2;
+ float f = dot(fenc,fenc);
+ float g = sqrt(1-f/4);
+ vec3 n;
+ n.xy = fenc*g;
+ n.z = 1-f/2;
+ return n;
+}
#endif
vec4 getPosition(vec2 pos_screen)