summaryrefslogtreecommitdiffstats
path: root/tests/autodiff/differential-visibility.slang
blob: 368155678296af89ac77004f82bff5f4e2379192 (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
//TEST:SIMPLE(filecheck=CHECK): -target spirv
// CHECK: OpEntryPoint 
public interface IBSDF
{
    public float3 get_value();
}

public struct AnisotropicGGX // : IDifferentiable
{
    float2 alpha = {};
    public __init() { }
};

public struct TestDiffVisibility : IBSDF, IDifferentiable
{
    public AnisotropicGGX D = {};
    public __init() { }
    public float3 get_value() { return { 0.3 }; }
};

[numthreads(1,1,1)]
void main()
{
    TestDiffVisibility test = {};
    test.get_value();
}