// Copyright Contributors to the Open Shading Language project.
// SPDX-License-Identifier: BSD-3-Clause
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage

shader
test_matrix_u_float (output color Cout = 0)
{
    matrix m1 = matrix(1.0/(4*raytype("camera")));
    

    matrix m2 = m1;
    if (int(P[0]*64)%2==0) {
        m2 = matrix(1.0/(2*raytype("camera")));        
    }
    
    Cout = color(m2[0][0] + m2[0][1] + m2[0][2] + m2[0][3],
                 m2[1][0] + m2[1][1] + m2[1][2] + m2[1][3],
                 m2[2][0] + m2[2][1] + m2[2][2] + m2[2][3] +
                 m2[3][0] + m2[3][1] + m2[3][2] + m2[3][3]);
}
