1. /*
    2. * original script from -
    3. * http://www.openshading.com/osl/example-shaders/
    4. * New/3-clause BSD" license
    5. */
    6. shader HSVSplitter
    7. [[ string help = "Splits the RGB input into HSV Outputs",
    8. string label = "HSV Splitter" ]]
    9. (
    10. color Color = 0.8,
    11. output float H = 0.0,
    12. output float S = 0.0,
    13. output float V = 0.0)
    14. {
    15. color HSV = transformc("hsv", Color);
    16. H = HSV[0];
    17. S = HSV[1];
    18. V = HSV[2];
    19. }