yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Darren WihandiAdd SampleCmpLevel intrinsics (#6004)2249d6ffb

master
366 B17 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv
2
3// CHECK: OpImageSampleDrefExplicitLod
4// CHECK: OpImageSampleDrefExplicitLod
5
6Sampler2DShadow ss;
7
8RWStructuredBuffer<float> output;
9
10[numthreads(1,1,1)]
11void computeMain()
12{
13    output[0] = ss.SampleCmpLevelZero(float2(0.0), 0.5);
14
15    float level = 1.5;
16    output[1] = ss.SampleCmpLevel(float2(0.0), 0.5, level);
17}