From e0f2b1113c94b79c798ec44c039a9e573496f15c Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 17 Mar 2013 12:11:47 +0000 Subject: [PATCH] try to fix ripplemaps. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4257 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/shaders/glsl/altwater.glsl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/engine/shaders/glsl/altwater.glsl b/engine/shaders/glsl/altwater.glsl index dfe676799..ff13a3310 100644 --- a/engine/shaders/glsl/altwater.glsl +++ b/engine/shaders/glsl/altwater.glsl @@ -47,13 +47,12 @@ uniform sampler2D s_t1; //normalmap uniform sampler2D s_t2; //diffuse/reflection #ifdef DEPTH uniform sampler2D s_t3; //refraction depth -#ifdef RIPPLEMAP -uniform sampler2D s_t4; //ripplemap -#endif +#define s_ripplemap s_t4 #else -#ifdef RIPPLEMAP -uniform sampler2D s_t3; //ripplemap +#define s_ripplemap s_t3 #endif +#ifdef RIPPLEMAP +uniform sampler2D s_ripplemap; //ripplemap #endif uniform float e_time; @@ -77,7 +76,7 @@ void main (void) n -= 1.0 - 4.0/256.0; #ifdef RIPPLEMAP - n += texture2D(s_t4, stc).rgb*3.0; + n += texture2D(s_ripplemap, stc).rgb*3.0; #endif //the fresnel term decides how transparent the water should be