From: havoc Date: Thu, 27 Oct 2011 21:07:34 +0000 (+0000) Subject: added USEREFLECTCUBE case to MODE_GENERIC, this disables use of texture X-Git-Tag: xonotic-v0.6.0~215 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2b209734a8334498818054729b1ce2246d5aa0ea;p=xonotic%2Fdarkplaces.git added USEREFLECTCUBE case to MODE_GENERIC, this disables use of texture alpha on the first texture so that the motion blur compositing works properly regardless of accumulated framebuffer alpha fix USEGAMMARAMPS in HLSL because it was using an undeclared dp_texture2D macro git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11484 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=3fa489aae418051ad8c533ec570eb315a29ba29b --- diff --git a/shader_glsl.h b/shader_glsl.h index 4e37e273..33cbb95e 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -334,7 +334,12 @@ " dp_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n" "#endif\n" "#ifdef USEDIFFUSE\n" +"# ifdef USEREFLECTCUBE\n" +" // suppress texture alpha\n" +" dp_FragColor.rgb *= dp_texture2D(Texture_First, TexCoord1).rgb;\n" +"# else\n" " dp_FragColor *= dp_texture2D(Texture_First, TexCoord1);\n" +"# endif\n" "#endif\n" "\n" "#ifdef USESPECULAR\n" diff --git a/shader_hlsl.h b/shader_hlsl.h index 4b6da04e..a1d537d4 100644 --- a/shader_hlsl.h +++ b/shader_hlsl.h @@ -307,7 +307,12 @@ " gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n" "#endif\n" "#ifdef USEDIFFUSE\n" +"# ifdef USEREFLECTCUBE\n" +" // suppress texture alpha\n" +" dp_FragColor.rgb *= tex2D(Texture_First, TexCoord1).rgb;\n" +"# else\n" " gl_FragColor *= tex2D(Texture_First, TexCoord1);\n" +"# endif\n" "#endif\n" "\n" "#ifdef USESPECULAR\n" @@ -323,9 +328,9 @@ "# endif\n" "#endif\n" "#ifdef USEGAMMARAMPS\n" -" dp_FragColor.r = dp_texture2D(Texture_GammaRamps, vec2(dp_FragColor.r, 0)).r;\n" -" dp_FragColor.g = dp_texture2D(Texture_GammaRamps, vec2(dp_FragColor.g, 0)).g;\n" -" dp_FragColor.b = dp_texture2D(Texture_GammaRamps, vec2(dp_FragColor.b, 0)).b;\n" +" dp_FragColor.r = tex2D(Texture_GammaRamps, vec2(dp_FragColor.r, 0)).r;\n" +" dp_FragColor.g = tex2D(Texture_GammaRamps, vec2(dp_FragColor.g, 0)).g;\n" +" dp_FragColor.b = tex2D(Texture_GammaRamps, vec2(dp_FragColor.b, 0)).b;\n" "#endif\n" "}\n" "#endif\n"