summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterV.glsl16
3 files changed, 11 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index 3427d6db57..1ae006bc8a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -151,8 +151,8 @@ void main()
//spec *= shadow;
//color.rgb += spec * specular;
- //color.rgb = atmosTransport(color.rgb);
- //color.rgb = scaleSoftClip(color.rgb);
+ color.rgb = atmosTransport(color.rgb);
+ color.rgb = scaleSoftClip(color.rgb);
//color.a = spec * sunAngle2;
//wavef.z *= 0.1f;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl
index 9734acf005..ece34dcc4e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl
@@ -85,7 +85,7 @@ void main()
pos.w = 1.0;
pos = modelview_matrix*pos;
- calcAtmospherics(pos.xyz);
+ calcAtmospherics(view.xyz);
//pass wave parameters to pixel shader
vec2 bigWave = (v.xy) * vec2(0.04,0.04) + d1 * time * 0.055;
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
index f66ba1d2d9..5aff156eae 100644
--- 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,41 +49,40 @@ 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;
- calcAtmospherics(pos.xyz);
-
+ calcAtmospherics(view.xyz);
//pass wave parameters to pixel shader
vec2 bigWave = (v.xy) * vec2(0.04,0.04) + d1 * time * 0.055;