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


surface
matte
    [[ string description = "Lambertian diffuse material" ]]
(
    float Kd = 1
        [[  string description = "Diffuse scaling",
            float UImin = 0, float UIsoftmax = 1 ]],
    color Cs = 1
        [[  string description = "Base color",
            float UImin = 0, float UImax = 1 ]],
    float roughness = 0.5
        [[  string description = "Roughness of the surface",
            float UImin = 0, float UImax = 1 ]]
  )
{
    Ci = Kd * oren_nayar_diffuse_bsdf (N, Cs, roughness, "energy_compensation", N.y < 0);
}
