From b24990ca2873aa0666e0252f940f6dd80ac84ef7 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 8 Dec 2011 03:20:31 -0600 Subject: 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. --- Source/Core/VideoCommon/Src/TextureConversionShader.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Source/Core/VideoCommon/Src/TextureConversionShader.cpp') diff --git a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp index 8e45955d4a..e4638f8b16 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"; -- cgit v1.2.3