]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
update HLSL shader to no longer swap R/B color components on vertex
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 3 Mar 2011 17:53:37 +0000 (17:53 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 3 Mar 2011 17:53:37 +0000 (17:53 +0000)
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

gl_rmain.c

index b5c972e8ba18a85885b623534faa0e6094528d15..40670cd8c120c213307e1f3454c60a61599833b9 100644 (file)
@@ -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"