summaryrefslogtreecommitdiffstats
path: root/tests/spirv/sampler-shadow.slang
blob: 35b96e7465637f14aa77f423bb305c8b7e9c080b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//TEST:SIMPLE(filecheck=CHECK): -target spirv

// CHECK: OpImageSampleDrefExplicitLod
// CHECK: OpImageSampleDrefExplicitLod

Sampler2DShadow ss;

RWStructuredBuffer<float> output;

[numthreads(1,1,1)]
void computeMain()
{
    output[0] = ss.SampleCmpLevelZero(float2(0.0), 0.5);

    float level = 1.5;
    output[1] = ss.SampleCmpLevel(float2(0.0), 0.5, level);
}