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


shader
test_v_float_u_float_u_int (output color Cout = 0)
{
    float val = 1.0/(2*raytype("camera"));
    float val2 = 1.0/(4*raytype("camera"));
    
    
    int c1 = raytype("camera");
    int c2 = 0*raytype("camera");
              
    float red = select(P[0], val2, c1);
    float green = select(P[1], val, c1);
    float blue =  select(P[2], val2, c2);
    Cout = color(red,green,blue);
    
    
    if (int(P[0]*32)%2==0) {    
        green = select(P[1], val, c2);
        blue =  select(P[2], val2, c1);
    }
        
    Cout[1] = green;
    Cout[2] = blue;
}
