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

shader layer_a_return_exit_in_varying_then (float Kd = 0.5,
          output float f_out = 0,
          output color c_out = 0
    )
{
    if (P[1] > 0.4) {
        return;
    }
    f_out = Kd*P[0];
    if (P[0] > 0.75) {
        exit();
    }
    c_out = color (f_out/2, 1, 1);
    
    printf ("a: f_out = %g, c_out = %g\n", f_out, c_out);
}
