diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-08-23 11:19:04 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-08-23 11:19:04 -0700 |
commit | 11d7a7f197d31617602ff9c109674a783fd6fa71 (patch) | |
tree | 2b5e80597f3a8e586bb8018fd117e39da031ec5b /indra/newview/app_settings/shaders | |
parent | 764b7a1ec0a92bd9948010ac76a7c4362d66acf6 (diff) |
Mac crash fixes.
Reviewed by davep.
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/environment/waterV.glsl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl index b99fab2c0f..831a7de0ea 100644 --- a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl @@ -57,19 +57,20 @@ void main() float d = length(oEyeVec.xy); float ld = min(d, 2560.0); - position.xy = eyeVec.xy + oEyeVec.xy/d*ld; + vec3 lpos = position; + lpos.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(position, 1.0); + oPosition = vec4(lpos, 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 = position.xyz; + vec3 v = lpos; v.x += (cos(v.x*0.08/*+time*0.01*/)+sin(v.y*0.02))*6.0; //push position for further horizon effect. |