1cb93a386Sopenharmony_ciuniform half4 colorGreen, colorRed; 2cb93a386Sopenharmony_ciuniform float2x2 testMatrix2x2; 3cb93a386Sopenharmony_ciuniform float3x3 testMatrix3x3; 4cb93a386Sopenharmony_ciuniform half4 testInputs; // equals (-1.25, 0, 0.75, 2.25) 5cb93a386Sopenharmony_ci 6cb93a386Sopenharmony_cihalf4 main(float2 coords) { 7cb93a386Sopenharmony_ci const float2 c12 = float2(1, 2); 8cb93a386Sopenharmony_ci const float2 c34 = float2(3, 4); 9cb93a386Sopenharmony_ci const float3 c123 = float3(1, 2, 3); 10cb93a386Sopenharmony_ci const float3 c456 = float3(4, 5, 6); 11cb93a386Sopenharmony_ci 12cb93a386Sopenharmony_ci return (outerProduct(testMatrix2x2[0], testMatrix2x2[1]) == float2x2(3, 6, 13cb93a386Sopenharmony_ci 4, 8) 14cb93a386Sopenharmony_ci && outerProduct(c12, c34) == float2x2(3, 6, 15cb93a386Sopenharmony_ci 4, 8) 16cb93a386Sopenharmony_ci && outerProduct(testMatrix3x3[0], testMatrix3x3[1]) == float3x3(4, 8, 12, 17cb93a386Sopenharmony_ci 5, 10, 15, 18cb93a386Sopenharmony_ci 6, 12, 18) 19cb93a386Sopenharmony_ci && outerProduct(c123, c456) == float3x3(4, 8, 12, 20cb93a386Sopenharmony_ci 5, 10, 15, 21cb93a386Sopenharmony_ci 6, 12, 18) 22cb93a386Sopenharmony_ci && outerProduct(testMatrix2x2[0], testMatrix3x3[1]) == float3x2(4, 8, 23cb93a386Sopenharmony_ci 5, 10, 24cb93a386Sopenharmony_ci 6, 12) 25cb93a386Sopenharmony_ci && outerProduct(c12, c456) == float3x2(4, 8, 26cb93a386Sopenharmony_ci 5, 10, 27cb93a386Sopenharmony_ci 6, 12) 28cb93a386Sopenharmony_ci && outerProduct(testInputs, half4(1, 0, 0, 2)) == float4x4(-1.25, 0.0, 0.75, 2.25, 29cb93a386Sopenharmony_ci 0.0, 0.0, 0.0, 0.0, 30cb93a386Sopenharmony_ci 0.0, 0.0, 0.0, 0.0, 31cb93a386Sopenharmony_ci -2.50, 0.0, 1.50, 4.50) 32cb93a386Sopenharmony_ci && outerProduct(half4(-1.25, 0, 0.75, 2.25), half4(1, 0, 0, 2)) 33cb93a386Sopenharmony_ci == float4x4(-1.25, 0.0, 0.75, 2.25, 34cb93a386Sopenharmony_ci 0.0, 0.0, 0.0, 0.0, 35cb93a386Sopenharmony_ci 0.0, 0.0, 0.0, 0.0, 36cb93a386Sopenharmony_ci -2.50, 0.0, 1.50, 4.50) 37cb93a386Sopenharmony_ci && outerProduct(testInputs, c12) == float2x4(-1.25, 0.0, 0.75, 2.25, 38cb93a386Sopenharmony_ci -2.50, 0.0, 1.50, 4.50) 39cb93a386Sopenharmony_ci && outerProduct(c12, testInputs) == float4x2(-1.25, -2.50, 40cb93a386Sopenharmony_ci 0.0, 0.0, 41cb93a386Sopenharmony_ci 0.75, 1.50, 42cb93a386Sopenharmony_ci 2.25, 4.50)) 43cb93a386Sopenharmony_ci ? colorGreen : colorRed; 44cb93a386Sopenharmony_ci} 45