Adreno doesn't like negations when using discard, apparently..

This commit is contained in:
Henrik Rydgard 2013-03-10 16:00:15 +01:00
parent 16df2c6267
commit 654620cb66

View file

@ -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.