Very small cleanup in PixelShaderGen

This commit is contained in:
Ryan Houdek 2012-12-28 11:49:21 -06:00
parent d9f3fc4495
commit a25a00640e
1 changed files with 5 additions and 8 deletions

View File

@ -667,7 +667,7 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
WRITE(p, " out float4 ocol0 : COLOR0,%s%s\n in float4 rawpos : %s,\n",
dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND ? "\n out float4 ocol1 : COLOR1," : "",
DepthTextureEnable ? "\n out float depth : DEPTH," : "",
ApiType & API_OPENGL ? "WPOS" : ApiType & API_D3D9_SM20 ? "POSITION" : "VPOS");
ApiType & API_D3D9_SM20 ? "POSITION" : "VPOS");
}
else
{
@ -782,12 +782,9 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
if (!Pretest)
{
// alpha test will always fail, so restart the shader and just make it an empty function
WRITE(p, "ocol0 = float4(0.0);\n");
if(DepthTextureEnable)
WRITE(p, "depth = 1.f;\n");
WRITE(p, "ocol0 = float4(0.0f);\n");
if(dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND)
WRITE(p, "ocol1 = 0;\n");
WRITE(p, "ocol1 = float4(0.0f);\n");
if(ApiType == API_OPENGL && dstAlphaMode != DSTALPHA_DUAL_SOURCE_BLEND)
WRITE(p, "gl_FragData[0] = ocol0;\n");
if(ApiType != API_D3D11)