hrydgard/ppsspp — pull request #6491 by unknownbrackets (2014-07-03 06:19:35+00:00)
Title: Try to fix color test masking on GLES3 devices

Not tested, though, since I don't have one... from reporting.

```
Error in shader compilation: info: Fragment shader compilation failed.
ERROR: 0:11: '&' : wrong operand types no operation '&' exists that takes a left-hand operand of type '3-component vector of int' and a right operand of type '3-component vector of int' (or there is no acceptable conversion)
ERROR: 0:11: '&' : wrong operand types no operation '&' exists that takes a left-hand operand of type '3-component vector of int' and a right operand of type '3-component vector of int' (or there is no acceptable conversion)
ERROR: 2 compilation errors. No code generated.

/ code: #version 300 es
precision lowp float;
uniform vec4 u_alphacolorref;
uniform ivec4 u_alphacolormask;
in vec4 v_color0;
ivec3 roundAndScaleTo255iv(in vec3 x) { return ivec3(floor(x * 255.0 + 0.5)); }
out vec4 fragColor0;
void main() {
vec4 v = v_color0 ;
if (v.a < 0.002) discard;
if ((roundAndScaleTo255iv(v.rgb) & u_alphacolormask.rgb) == (ivec3(u_alphacolorref.rgb) & u_alphacolormask.rgb)) discard;
fragColor0 = v;
}
```

I'm assuming this means it doesn't support `ivec3() & ivec3()` although it seemed like desktop did.

-[Unknown]