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

#include "mystruct.h"

shader test (float a = 0, float b = 0,
             float c = 0 [[ int lockgeom=0 ]],
             MyStruct mystruct1 = {0,0},
             MyStruct mystruct2 = {0,0},
             output float Fout = 1)
{
    printf ("a=%g\n", a);   // force retrieval/execution of upstream layer
    printf ("Downstream:\n");
    status (a, "a");
    status (b, "b");
    status (c, "c");
    status (mystruct1, "mystruct1");
    status (mystruct2, "mystruct2");
    
    if (isconnected(Fout) == 2)
    {
      Fout = .42;
    }
    else
    {
      Fout = 0;
    }
    status (Fout, "Fout");
}
