From: havoc Date: Thu, 3 Mar 2011 17:53:37 +0000 (+0000) Subject: update HLSL shader to no longer swap R/B color components on vertex X-Git-Tag: xonotic-v0.5.0~425^2~15 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=67f8d0a2ef03322d567d605d781bd6993e187f44;p=xonotic%2Fdarkplaces.git update HLSL shader to no longer swap R/B color components on vertex colors, as they are no longer being sent as D3DCOLOR git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10888 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index b5c972e8..40670cd8 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -2106,11 +2106,7 @@ const char *builtinhlslshaderstring = "out float4 gl_FrontColor : COLOR\n" ")\n" "{\n" -"#ifdef HLSL\n" -" gl_FrontColor = gl_Color.bgra; // NOTE: D3DCOLOR is backwards\n" -"#else\n" -" gl_FrontColor = gl_Color; // Cg is forward\n" -"#endif\n" +" gl_FrontColor = gl_Color;\n" "#ifdef USEDIFFUSE\n" " TexCoord1 = gl_MultiTexCoord0.xy;\n" "#endif\n" @@ -2574,11 +2570,7 @@ const char *builtinhlslshaderstring = "{\n" " TexCoordBoth = mul(TexMatrix, gl_MultiTexCoord0);\n" "#ifdef USEVERTEXTEXTUREBLEND\n" -"#ifdef HLSL\n" -" gl_FrontColor = gl_Color.bgra; // NOTE: D3DCOLOR is backwards\n" -"#else\n" -" gl_FrontColor = gl_Color; // Cg is forward\n" -"#endif\n" +" gl_FrontColor = gl_Color;\n" " TexCoordBoth.zw = float2(Backgroundmul(TexMatrix, gl_MultiTexCoord0));\n" "#endif\n" "\n" @@ -2870,11 +2862,7 @@ const char *builtinhlslshaderstring = ")\n" "{\n" "#if defined(MODE_VERTEXCOLOR) || defined(USEVERTEXTEXTUREBLEND)\n" -"#ifdef HLSL\n" -" gl_FrontColor = gl_Color.bgra; // NOTE: D3DCOLOR is backwards\n" -"#else\n" -" gl_FrontColor = gl_Color; // Cg is forward\n" -"#endif\n" +" gl_FrontColor = gl_Color;\n" "#endif\n" " // copy the surface texcoord\n" " TexCoordBoth = mul(TexMatrix, gl_MultiTexCoord0);\n"