]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - shader_hlsl.h
support alphaGen vertex
[xonotic/darkplaces.git] / shader_hlsl.h
index f20f8329e7ad7d45a651175e789ad3fb857b84e3..78f291c619449265a5aed050caafe5f586188f05 100644 (file)
 "#ifdef USESHADOWMAPORTHO\n"
 "uniform float4x4 ShadowMapMatrix : register(c16),\n"
 "#endif\n"
-"#if defined(MODE_VERTEXCOLOR) || defined(USEVERTEXTEXTUREBLEND)\n"
+"#if defined(MODE_VERTEXCOLOR) || defined(USEVERTEXTEXTUREBLEND) || defined(MODE_LIGHTDIRECTIONMAP_FORCED_VERTEXCOLOR) || defined(USEALPHAGENVERTEX)\n"
 "out float4 gl_FrontColor : COLOR,\n"
 "#endif\n"
 "out float4 TexCoordBoth : TEXCOORD0,\n"
 "out float4 gl_Position : POSITION\n"
 ")\n"
 "{\n"
-"#if defined(MODE_VERTEXCOLOR) || defined(USEVERTEXTEXTUREBLEND)\n"
+"#if defined(MODE_VERTEXCOLOR) || defined(USEVERTEXTEXTUREBLEND) || defined(MODE_LIGHTDIRECTIONMAP_FORCED_VERTEXCOLOR) || defined(USEALPHAGENVERTEX)\n"
 "      gl_FrontColor = gl_Color;\n"
 "#endif\n"
 "      // copy the surface texcoord\n"
 "      //color = half4(lerp(float4(1, 0, 0, 1), color, terrainblend));\n"
 "#endif\n"
 "#endif\n"
+"#ifdef USEALPHAGENVERTEX\n"
+"      color.a *= gl_FrontColor.a;\n"
+"#endif\n"
 "\n"
 "      // get the surface normal\n"
 "#ifdef USEVERTEXTEXTUREBLEND\n"