1 2out vec4 sk_FragColor; 3uniform vec4 colorGreen; 4uniform vec4 colorRed; 5uniform mat2 testMatrix2x2; 6vec4 main() { 7 vec4 f4 = vec4(testMatrix2x2); 8 bool ok = mat2(f4.xyz, 4.0) == mat2(1.0, 2.0, 3.0, 4.0); 9 ok = ok && mat3(f4.xy, f4.zw, f4, f4.x) == mat3(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0); 10 ok = ok && mat4(f4.xyz, f4.wxy, f4.zwxy, f4.zw, f4) == mat4(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0); 11 return ok ? colorGreen : colorRed; 12} 13