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

shader
test_normalize_v_vector (output color Cout = 0)
{
    float  val = u;
    float val2 = v;
    float val3 = u+v;

    vector v1 = vector(val, val2, val3);
    vector v2 = vector(val3, val, val2);
    
    vector nv = normalize(v1);
    
    if (int(P[0]*64)%2==0) {
        nv = normalize(v2);
    }
    
    Cout = nv;
}
