diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2011-12-08 03:20:31 -0600 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2011-12-08 03:20:31 -0600 |
| commit | cecc3c3873c6aaabea514b3a5eff380e5a32856f (patch) | |
| tree | 30b8de4c172ee25353e188e0e238d49d28ea67f8 /Source/Core/VideoCommon/Src/TextureConversionShader.cpp | |
| parent | 1201988fe4e94720f32f2165ee03d5debf957cd7 (diff) | |
Bit of cleanup. Clean up my massive hack in the ShaderManagerFiles. Almost feature parity with Nvidia CG now I think. Just need to do Alpha test with Dual source blending now.
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureConversionShader.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/TextureConversionShader.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp index 1be760a608..550fef2740 100644 --- a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp @@ -149,12 +149,12 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType) WRITE(p, " sampleUv = sampleUv * "I_COLORS"[0].xy;\n"); - if(ApiType == API_OPENGL) + if(ApiType == API_OPENGL || ApiType == API_GLSL) WRITE(p," sampleUv.y = "I_COLORS"[1].y - sampleUv.y;\n"); WRITE(p, " sampleUv = sampleUv + "I_COLORS"[1].zw;\n"); - if(ApiType != API_OPENGL) + if(ApiType != API_OPENGL && ApiType != API_GLSL) { WRITE(p, " sampleUv = sampleUv + float2(0.0f,1.0f);\n");// still to determine the reason for this WRITE(p, " sampleUv = sampleUv / "I_COLORS"[0].zw;\n"); @@ -237,12 +237,12 @@ void Write32BitSwizzler(char*& p, u32 format, API_TYPE ApiType) WRITE(p, " sampleUv.y = yb + xoff;\n"); WRITE(p, " sampleUv = sampleUv * "I_COLORS"[0].xy;\n"); - if(ApiType == API_OPENGL) + if(ApiType == API_OPENGL || ApiType == API_GLSL) WRITE(p," sampleUv.y = "I_COLORS"[1].y - sampleUv.y;\n"); WRITE(p, " sampleUv = sampleUv + "I_COLORS"[1].zw;\n"); - if(ApiType != API_OPENGL) + if(ApiType != API_OPENGL && ApiType != API_GLSL) { WRITE(p, " sampleUv = sampleUv + float2(0.0f,1.0f);\n");// still to determine the reason for this WRITE(p, " sampleUv = sampleUv / "I_COLORS"[0].zw;\n"); @@ -263,7 +263,7 @@ void WriteSampleColor(char*& p, const char* colorComp, const char* dest, API_TYP // the increment of sampleUv.x is delayed, so we perform it here. see WriteIncrementSampleX. const char* texSampleIncrementUnit; - if(ApiType != API_OPENGL) + if(ApiType != API_OPENGL || ApiType != API_GLSL) texSampleIncrementUnit = I_COLORS"[0].x / "I_COLORS"[0].z"; else texSampleIncrementUnit = I_COLORS"[0].x"; |
