From: divverent Date: Sun, 26 Sep 2010 12:14:21 +0000 (+0000) Subject: fix a display issue with warpzone decals I caused in my last change X-Git-Tag: xonotic-v0.1.0preview~56^2~119 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=41b3bfc57e21b55b823da97f4edcfc4fb8f4919c;p=xonotic%2Fdarkplaces.git fix a display issue with warpzone decals I caused in my last change git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10498 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index beb01358..af168782 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -887,7 +887,7 @@ static const char *builtinshaderstring = " f *= min(1.0, length(texture2D(Texture_Refraction, ScreenTexCoord + vec2(-0.01, 0.01)).rgb) / 0.05);\n" " f *= min(1.0, length(texture2D(Texture_Refraction, ScreenTexCoord + vec2(-0.01, -0.01)).rgb) / 0.05);\n" " ScreenTexCoord = mix(SafeScreenTexCoord, ScreenTexCoord, f);\n" -" gl_FragColor = texture2D(Texture_Refraction, ScreenTexCoord) * RefractColor;\n" +" gl_FragColor = vec4(texture2D(Texture_Refraction, ScreenTexCoord).rgb, 1.0) * RefractColor;\n" "}\n" "#endif\n" "#else // !MODE_REFRACTION\n" @@ -951,7 +951,7 @@ static const char *builtinshaderstring = " f *= min(1.0, length(texture2D(Texture_Reflection, ScreenTexCoord.zw + vec2(-0.01, -0.01)).rgb) / 0.05);\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" +" gl_FragColor = mix(vec4(texture2D(Texture_Refraction, ScreenTexCoord.xy).rgb, 1) * RefractColor, vec4(texture2D(Texture_Reflection, ScreenTexCoord.zw).rgb, 1) * ReflectColor, Fresnel);\n" "}\n" "#endif\n" "#else // !MODE_WATER\n" @@ -2156,7 +2156,7 @@ const char *builtincgshaderstring = " f *= min(1.0, length(tex2D(Texture_Refraction, ScreenTexCoord + float2(-0.01, 0.01)).rgb) / 0.05);\n" " f *= min(1.0, length(tex2D(Texture_Refraction, ScreenTexCoord + float2(-0.01, -0.01)).rgb) / 0.05);\n" " ScreenTexCoord = lerp(SafeScreenTexCoord, ScreenTexCoord, f);\n" -" gl_FragColor = tex2D(Texture_Refraction, ScreenTexCoord) * RefractColor;\n" +" gl_FragColor = float4(tex2D(Texture_Refraction, ScreenTexCoord).rgb, 1) * RefractColor;\n" "}\n" "#endif\n" "#else // !MODE_REFRACTION\n" @@ -2233,7 +2233,7 @@ const char *builtincgshaderstring = " f *= min(1.0, length(tex2D(Texture_Reflection, ScreenTexCoord.zw + float2(-0.01, -0.01)).rgb) / 0.05);\n" " ScreenTexCoord.zw = lerp(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 = lerp(tex2D(Texture_Refraction, ScreenTexCoord.xy) * RefractColor, tex2D(Texture_Reflection, ScreenTexCoord.zw) * ReflectColor, Fresnel);\n" +" gl_FragColor = lerp(float4(tex2D(Texture_Refraction, ScreenTexCoord.xy).rgb, 1) * RefractColor, float4(tex2D(Texture_Reflection, ScreenTexCoord.zw).rgb, 1) * ReflectColor, Fresnel);\n" "}\n" "#endif\n" "#else // !MODE_WATER\n"