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

shader
test_max_u_float_v_float (output color Cout = 0)
{
    float val = 1 - u;
    float val2 = 2*val;
                  
    float numerator = 0.3;
    
    float red = 0.0;
    float green = 0.5;
    float blue = 1.0;
    
    red = max(numerator,val);
    green = max(numerator,int(v));
    blue = max((2*numerator), val);
    
    if (int(P[0]*64)%2==0) {    
        red = max(numerator, val2);
        green = max(numerator, int(v));
        blue = max((2*numerator), val2);
    }
    
    Cout = color(red,green,blue);
}
