summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2012-12-28 11:49:21 -0600
committerRyan Houdek <Sonicadvance1@gmail.com>2012-12-28 11:49:21 -0600
commita25a00640eed85fedb8fe2fae47389d9fdfe4c84 (patch)
tree513ac74575c3f857bbb7bae1c2dc8838cb5c76e5 /Source/Core/VideoCommon/Src/PixelShaderGen.cpp
parentd9f3fc4495e0d836d3c6b87ce9e0390db516bd2b (diff)
Very small cleanup in PixelShaderGen
Diffstat (limited to 'Source/Core/VideoCommon/Src/PixelShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/PixelShaderGen.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
index 8460df12d6..492c46a5d0 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
@@ -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
{
@@ -728,7 +728,7 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
WRITE(p, " float4 ocol0;\n");
}
if (DepthTextureEnable)
- WRITE(p, " float depth;\n"); // TODO: Passed to Vertex Shader right?
+ WRITE(p, " float depth;\n"); // TODO: Passed to Vertex Shader right?
WRITE(p, " float4 rawpos = gl_FragCoord;\n");
WRITE(p, "VARYIN float4 colors_02;\n");
@@ -782,14 +782,11 @@ 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");
+ WRITE(p, "gl_FragData[0] = ocol0;\n");
if(ApiType != API_D3D11)
WRITE(p, "return;\n");
}