From cab89348f16246be4bd72f23bcf21c929b79451f Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 25 Sep 2009 21:21:50 +0000 Subject: [PATCH] fix a compile error FruitieX gets git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9237 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index f48f4086..1d2091b1 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -1072,15 +1072,15 @@ static const char *builtinshaderstring = " // content.\n" " // Remove this 'ack once we have a better way to stop this thing from\n" " // 'appening.\n" -" float f = min(1, length(texture2D(Texture_Refraction, ScreenTexCoord.xy + vec2(0.05, 0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Refraction, ScreenTexCoord.xy + vec2(0.05, -0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Refraction, ScreenTexCoord.xy + vec2(-0.05, 0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Refraction, ScreenTexCoord.xy + vec2(-0.05, -0.05))) / 0.02);\n" +" float f = min(1.0, length(texture2D(Texture_Refraction, ScreenTexCoord.xy + vec2(0.05, 0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Refraction, ScreenTexCoord.xy + vec2(0.05, -0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Refraction, ScreenTexCoord.xy + vec2(-0.05, 0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Refraction, ScreenTexCoord.xy + vec2(-0.05, -0.05))) / 0.02);\n" " ScreenTexCoord.xy = mix(SafeScreenTexCoord.xy, ScreenTexCoord.xy, f);\n" -" f = min(1, length(texture2D(Texture_Reflection, ScreenTexCoord.zw + vec2(0.05, 0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Reflection, ScreenTexCoord.zw + vec2(0.05, -0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Reflection, ScreenTexCoord.zw + vec2(-0.05, 0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Reflection, ScreenTexCoord.zw + vec2(-0.05, -0.05))) / 0.02);\n" +" f = min(1.0, length(texture2D(Texture_Reflection, ScreenTexCoord.zw + vec2(0.05, 0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Reflection, ScreenTexCoord.zw + vec2(0.05, -0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Reflection, ScreenTexCoord.zw + vec2(-0.05, 0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Reflection, ScreenTexCoord.zw + vec2(-0.05, -0.05))) / 0.02);\n" " ScreenTexCoord.zw = mix(SafeScreenTexCoord.zw, ScreenTexCoord.zw, f);\n" " float Fresnel = pow(min(1.0, 1.0 - float(normalize(EyeVector).z)), 2.0) * ReflectFactor + ReflectOffset;\n" " gl_FragColor = mix(texture2D(Texture_Refraction, ScreenTexCoord.xy) * RefractColor, texture2D(Texture_Reflection, ScreenTexCoord.zw) * ReflectColor, Fresnel);\n" @@ -1107,10 +1107,10 @@ static const char *builtinshaderstring = " // content.\n" " // Remove this 'ack once we have a better way to stop this thing from\n" " // 'appening.\n" -" float f = min(1, length(texture2D(Texture_Refraction, ScreenTexCoord + vec2(0.05, 0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Refraction, ScreenTexCoord + vec2(0.05, -0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Refraction, ScreenTexCoord + vec2(-0.05, 0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Refraction, ScreenTexCoord + vec2(-0.05, -0.05))) / 0.02);\n" +" float f = min(1.0, length(texture2D(Texture_Refraction, ScreenTexCoord + vec2(0.05, 0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Refraction, ScreenTexCoord + vec2(0.05, -0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Refraction, ScreenTexCoord + vec2(-0.05, 0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Refraction, ScreenTexCoord + vec2(-0.05, -0.05))) / 0.02);\n" " ScreenTexCoord = mix(SafeScreenTexCoord, ScreenTexCoord, f);\n" " gl_FragColor = texture2D(Texture_Refraction, ScreenTexCoord) * RefractColor;\n" "}\n" @@ -1344,10 +1344,10 @@ static const char *builtinshaderstring = " // content.\n" " // Remove this 'ack once we have a better way to stop this thing from\n" " // 'appening.\n" -" float f = min(1, length(texture2D(Texture_Reflection, ScreenTexCoord + vec2(0.05, 0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Reflection, ScreenTexCoord + vec2(0.05, -0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Reflection, ScreenTexCoord + vec2(-0.05, 0.05))) / 0.02);\n" -" f *= min(1, length(texture2D(Texture_Reflection, ScreenTexCoord + vec2(-0.05, -0.05))) / 0.02);\n" +" float f = min(1.0, length(texture2D(Texture_Reflection, ScreenTexCoord + vec2(0.05, 0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Reflection, ScreenTexCoord + vec2(0.05, -0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Reflection, ScreenTexCoord + vec2(-0.05, 0.05))) / 0.02);\n" +" f *= min(1.0, length(texture2D(Texture_Reflection, ScreenTexCoord + vec2(-0.05, -0.05))) / 0.02);\n" " ScreenTexCoord = mix(SafeScreenTexCoord, ScreenTexCoord, f);\n" " color.rgb = mix(color.rgb, myhalf3(texture2D(Texture_Reflection, ScreenTexCoord)) * ReflectColor.rgb, ReflectColor.a);\n" "#endif\n" -- 2.39.2