1/*#pragma settings DebugTrace*/ 2 3uniform half4 colorGreen, colorRed; 4uniform float3x3 testMatrix3x3; 5uniform float4x4 testMatrix4x4; 6 7bool test3x3() { 8 float3x3 matrix; 9 float3 values = float3(1, 2, 3); 10 for (int index=0; index<3; ++index) { 11 matrix[index] = values; 12 values += 3; 13 } 14 return matrix == testMatrix3x3; 15} 16 17bool test4x4() { 18 float4x4 matrix; 19 float4 values = float4(1, 2, 3, 4); 20 for (int index=0; index<4; ++index) { 21 matrix[index] = values; 22 values += 4; 23 } 24 return matrix == testMatrix4x4; 25} 26 27half4 main(float2 coords) { 28 return test3x3() && test4x4() ? colorGreen : colorRed; 29} 30