1*c8dee2aaSAndroid Build Coastguard Workeruniform half4 colorGreen, colorRed; 2*c8dee2aaSAndroid Build Coastguard Workeruniform float3x3 testMatrix3x3; 3*c8dee2aaSAndroid Build Coastguard Workeruniform float4x4 testMatrix4x4; 4*c8dee2aaSAndroid Build Coastguard Worker 5*c8dee2aaSAndroid Build Coastguard Workerbool test3x3() { 6*c8dee2aaSAndroid Build Coastguard Worker float3x3 matrix; 7*c8dee2aaSAndroid Build Coastguard Worker float3 values = float3(3, 2, 1); 8*c8dee2aaSAndroid Build Coastguard Worker for (int index=0; index<3; ++index) { 9*c8dee2aaSAndroid Build Coastguard Worker matrix[index].zx = values.xz; 10*c8dee2aaSAndroid Build Coastguard Worker matrix[index].y = values.y; 11*c8dee2aaSAndroid Build Coastguard Worker values += 3; 12*c8dee2aaSAndroid Build Coastguard Worker } 13*c8dee2aaSAndroid Build Coastguard Worker return matrix == testMatrix3x3; 14*c8dee2aaSAndroid Build Coastguard Worker} 15*c8dee2aaSAndroid Build Coastguard Worker 16*c8dee2aaSAndroid Build Coastguard Workerbool test4x4() { 17*c8dee2aaSAndroid Build Coastguard Worker float4x4 matrix; 18*c8dee2aaSAndroid Build Coastguard Worker float4 values = float4(4, 3, 2, 1); 19*c8dee2aaSAndroid Build Coastguard Worker for (int index=0; index<4; ++index) { 20*c8dee2aaSAndroid Build Coastguard Worker matrix[index].wx = values.xw; 21*c8dee2aaSAndroid Build Coastguard Worker matrix[index].zy = values.yz; 22*c8dee2aaSAndroid Build Coastguard Worker values += 4; 23*c8dee2aaSAndroid Build Coastguard Worker } 24*c8dee2aaSAndroid Build Coastguard Worker return matrix == testMatrix4x4; 25*c8dee2aaSAndroid Build Coastguard Worker} 26*c8dee2aaSAndroid Build Coastguard Worker 27*c8dee2aaSAndroid Build Coastguard Workerhalf4 main(float2 coords) { 28*c8dee2aaSAndroid Build Coastguard Worker return test3x3() && test4x4() ? colorGreen : colorRed; 29*c8dee2aaSAndroid Build Coastguard Worker} 30