From 654620cb665c026e215d1b350ecafe54b08f00d1 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sun, 10 Mar 2013 16:00:15 +0100 Subject: [PATCH] Adreno doesn't like negations when using discard, apparently.. --- GPU/GLES/FragmentShaderGenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/GLES/FragmentShaderGenerator.cpp b/GPU/GLES/FragmentShaderGenerator.cpp index 321ae0b0c0..2ff17f3daa 100644 --- a/GPU/GLES/FragmentShaderGenerator.cpp +++ b/GPU/GLES/FragmentShaderGenerator.cpp @@ -178,9 +178,9 @@ void GenerateFragmentShader(char *buffer) if (enableAlphaTest) { int alphaTestFunc = gstate.alphatest & 7; - const char *alphaTestFuncs[] = { "#", "#", " == ", " != ", " < ", " <= ", " > ", " >= " }; // never/always don't make sense + const char *alphaTestFuncs[] = { "#", "#", " != ", " == ", " >= ", " > ", " <= ", " < " }; // never/always don't make sense if (alphaTestFuncs[alphaTestFunc][0] != '#') - WRITE(p, " if (!(v.a %s u_alphacolorref.a)) discard;\n", alphaTestFuncs[alphaTestFunc]); + WRITE(p, " if (v.a %s u_alphacolorref.a) discard;\n", alphaTestFuncs[alphaTestFunc]); } // Disabled for now until we actually find a need for it.