summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/environment
diff options
context:
space:
mode:
authorAura Linden <aura@lindenlab.com>2013-07-11 17:49:13 -0700
committerAura Linden <aura@lindenlab.com>2013-07-11 17:49:13 -0700
commitce9962b33872db65b70c9b10901ec9062cb59169 (patch)
tree94be5367128e241ef1c6f802e8551a9b4ed786ff /indra/newview/app_settings/shaders/class1/environment
parent8642f57dd95864ec6b002f6519701f30866c6502 (diff)
parent6060e5e46acbeb20a301070a0fd0efea029d33d0 (diff)
Merged in viewer-release
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/environment')
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/shaders/class1/environment/terrainF.glsl0
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/shaders/class1/environment/terrainV.glsl0
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl0
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl0
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/shaders/class1/environment/waterF.glsl0
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl0
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/shaders/class1/environment/waterV.glsl13
7 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
index 668a710c04..668a710c04 100644..100755
--- a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
index d09c5f9247..d09c5f9247 100644..100755
--- a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
index a956562396..a956562396 100644..100755
--- a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
diff --git a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
index 0d8dab0a41..0d8dab0a41 100644..100755
--- a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
index 79bffab745..79bffab745 100644..100755
--- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
index 4bdfce9260..4bdfce9260 100644..100755
--- a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
index f66ba1d2d9..352cea7aaa 100644..100755
--- a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
@@ -28,6 +28,7 @@ uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
+
void calcAtmospherics(vec3 inPositionEye);
uniform vec2 d1;
@@ -48,35 +49,35 @@ float wave(vec2 v, float t, float f, vec2 d, float s)
void main()
{
//transform vertex
+ vec4 pos = vec4(position.xyz, 1.0);
mat4 modelViewProj = modelview_projection_matrix;
vec4 oPosition;
//get view vector
vec3 oEyeVec;
- oEyeVec.xyz = position.xyz-eyeVec;
+ oEyeVec.xyz = pos.xyz-eyeVec;
float d = length(oEyeVec.xy);
float ld = min(d, 2560.0);
- vec3 lpos = position;
- lpos.xy = eyeVec.xy + oEyeVec.xy/d*ld;
+ pos.xy = eyeVec.xy + oEyeVec.xy/d*ld;
view.xyz = oEyeVec;
d = clamp(ld/1536.0-0.5, 0.0, 1.0);
d *= d;
- oPosition = vec4(lpos, 1.0);
+ oPosition = vec4(position, 1.0);
oPosition.z = mix(oPosition.z, max(eyeVec.z*0.75, 0.0), d);
oPosition = modelViewProj * oPosition;
+
refCoord.xyz = oPosition.xyz + vec3(0,0,0.2);
//get wave position parameter (create sweeping horizontal waves)
- vec3 v = lpos;
+ vec3 v = pos.xyz;
v.x += (cos(v.x*0.08/*+time*0.01*/)+sin(v.y*0.02))*6.0;
//push position for further horizon effect.
- vec4 pos;
pos.xyz = oEyeVec.xyz*(waterHeight/oEyeVec.z);
pos.w = 1.0;
pos = modelview_matrix*pos;