summaryrefslogtreecommitdiffstats
path: root/tests/language-server/private-ctor-call/bsdfs.slang
blob: ff50ab3528e013ecfa263626f0baa34a38558221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module bsdfs;
__include lambert_diffuse_btdf;

public struct BSDFContext
{
    float iorI;  ///< IOR from incidence medium
    float iorT;  ///< IOR trom transmission medium
    bool inited; ///< Flag to indicate if the struct was initialized

    __init(float iorI_, float iorT_)
    {
        iorI = iorI_;
        iorT = iorT_;
        inited = true;
    }

    __init()
    {
        iorI = 1.f;
        iorT = 1.f;
        inited = false;
    }
}

public interface IBSDF
{
    public float3 eval(const float3 wi, const float3 wo, BSDFContext bc);
}