From 301f0a9071471d6d6601285ccb7922e44cea9857 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 12 Mar 2013 23:14:02 +0000 Subject: [PATCH] ------------------------------------------------------------------------ r4236 | acceptthis | 2013-03-06 17:39:51 +0000 (Wed, 06 Mar 2013) | 1 line glsl fix. gotta get a proper way to force nvidia to comply some time. :s ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4232 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/shaders/glsl/altwater.glsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/shaders/glsl/altwater.glsl b/engine/shaders/glsl/altwater.glsl index d5cfbaea3..dfe676799 100644 --- a/engine/shaders/glsl/altwater.glsl +++ b/engine/shaders/glsl/altwater.glsl @@ -106,17 +106,17 @@ void main (void) } //reduce the normals in shallow water (near walls, reduces the pain of linear sampling) - if (depth < 100) + if (depth < 100.0) n *= depth/100.0; #else - depth = 1; + depth = 1.0; #endif //refraction image (and water fog, if possible) refr = texture2D(s_t0, stc + n.st*STRENGTH*cvar_r_glsl_turbscale).rgb * TINT; #ifdef DEPTH - refr = mix(refr, FOGTINT, min(depth/4096, 1)); + refr = mix(refr, FOGTINT, min(depth/4096.0, 1.0)); #endif //reflection/diffuse