2024-02-22 18:30:16 -08:00
|
|
|
[require]
|
|
|
|
shader model >= 4.0
|
|
|
|
|
|
|
|
[sampler 0]
|
|
|
|
filter linear linear linear
|
|
|
|
address clamp clamp clamp
|
|
|
|
comparison never
|
|
|
|
|
|
|
|
[srv 0]
|
|
|
|
format r32 float shadow
|
|
|
|
size (2d, 2, 2)
|
|
|
|
0.5 0.5
|
|
|
|
0.5 0.5
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
Texture2D<float> t : register(t0);
|
|
|
|
SamplerComparisonState s : register(s0);
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
float ref = 0.5, delta = 0.00000007;
|
|
|
|
return float4(
|
|
|
|
t.SampleCmpLevelZero(s, float2(0.5, 0.5), ref - delta),
|
|
|
|
t.SampleCmpLevelZero(s, float2(0.5, 0.5), ref),
|
|
|
|
t.SampleCmpLevelZero(s, float2(0.5, 0.5), ref + delta),
|
|
|
|
1.0);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-22 18:30:16 -08:00
|
|
|
probe all rgba (0.0, 0.0, 0.0, 1.0)
|
|
|
|
|
|
|
|
[sampler 0]
|
|
|
|
filter linear linear linear
|
|
|
|
address clamp clamp clamp
|
|
|
|
comparison less
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-22 18:30:16 -08:00
|
|
|
probe all rgba (1.0, 0.0, 0.0, 1.0)
|
|
|
|
|
|
|
|
[sampler 0]
|
|
|
|
filter linear linear linear
|
|
|
|
address clamp clamp clamp
|
|
|
|
comparison equal
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-22 18:30:16 -08:00
|
|
|
probe all rgba (0.0, 1.0, 0.0, 1.0)
|
|
|
|
|
|
|
|
[sampler 0]
|
|
|
|
filter linear linear linear
|
|
|
|
address clamp clamp clamp
|
|
|
|
comparison less equal
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-22 18:30:16 -08:00
|
|
|
probe all rgba (1.0, 1.0, 0.0, 1.0)
|
|
|
|
|
|
|
|
[sampler 0]
|
|
|
|
filter linear linear linear
|
|
|
|
address clamp clamp clamp
|
|
|
|
comparison greater
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-22 18:30:16 -08:00
|
|
|
probe all rgba (0.0, 0.0, 1.0, 1.0)
|
|
|
|
|
|
|
|
[sampler 0]
|
|
|
|
filter linear linear linear
|
|
|
|
address clamp clamp clamp
|
|
|
|
comparison not equal
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-22 18:30:16 -08:00
|
|
|
probe all rgba (1.0, 0.0, 1.0, 1.0)
|
|
|
|
|
|
|
|
[sampler 0]
|
|
|
|
filter linear linear linear
|
|
|
|
address clamp clamp clamp
|
|
|
|
comparison greater equal
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-22 18:30:16 -08:00
|
|
|
probe all rgba (0.0, 1.0, 1.0, 1.0)
|
|
|
|
|
|
|
|
[sampler 0]
|
|
|
|
filter linear linear linear
|
|
|
|
address clamp clamp clamp
|
|
|
|
comparison always
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-22 18:30:16 -08:00
|
|
|
probe all rgba (1.0, 1.0, 1.0, 1.0)
|
|
|
|
|
|
|
|
|
|
|
|
[sampler 0]
|
|
|
|
filter linear linear linear
|
|
|
|
address clamp clamp clamp
|
|
|
|
comparison greater
|
|
|
|
|
|
|
|
% Non-constant ref
|
|
|
|
[pixel shader]
|
|
|
|
Texture2D<float> t : register(t0);
|
|
|
|
SamplerComparisonState s : register(s0);
|
|
|
|
|
|
|
|
float ref, delta;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
return float4(
|
|
|
|
t.SampleCmpLevelZero(s, float2(0.5, 0.5), ref - delta),
|
|
|
|
t.SampleCmpLevelZero(s, float2(0.5, 0.5), ref),
|
|
|
|
t.SampleCmpLevelZero(s, float2(0.5, 0.5), ref + delta),
|
|
|
|
1.0);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float 0.5
|
|
|
|
uniform 1 float 0.00000007
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-22 18:30:16 -08:00
|
|
|
probe all rgba (0.0, 0.0, 1.0, 1.0)
|
|
|
|
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
Texture2D<float> t : register(t0);
|
|
|
|
SamplerComparisonState s : register(s0);
|
|
|
|
|
|
|
|
float ref;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
float delta = 0.00000007;
|
|
|
|
return float4(
|
|
|
|
t.SampleCmp(s, float2(0.5, 0.5), ref - delta),
|
|
|
|
t.SampleCmp(s, float2(0.5, 0.5), 0.5),
|
|
|
|
t.SampleCmp(s, float2(0.5, 0.5), ref + delta),
|
|
|
|
1.0);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float 0.5
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-22 18:30:16 -08:00
|
|
|
probe all rgba (0.0, 0.0, 1.0, 1.0)
|