vkd3d/tests/hlsl/depth-bounds.shader_test

66 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

2024-09-01 16:46:43 -07:00
[require]
shader model >= 5.0
depth-bounds
[rtv 0]
size (2d, 640, 480)
[uav 1]
format r32-float
size (buffer, 1)
0.0
[dsv]
size (2d, 640, 480)
[vertex shader]
RWBuffer<float> u : register(u1);
float4 main(float4 position : position) : sv_position
{
u[0] = 0.0;
return float4(position.xy, 1.0, 1.0);
}
[pixel shader]
RWBuffer<float> u : register(u1);
[earlydepthstencil]
float4 main() : sv_target
{
u[0] = 1.0;
return float4(1, 1, 1, 1);
}
[test]
depth-bounds 0.3 0.6
depth greater equal
clear rtv 0 0.0 0.0 0.0 0.0
clear dsv 0.0
draw quad
probe (0, 0) rgba(0, 0, 0, 0)
probe uav 1 (0) r(0.0)
2024-09-01 16:46:43 -07:00
clear rtv 0 0.0 0.0 0.0 0.0
clear dsv 0.3
draw quad
2024-09-01 16:46:43 -07:00
probe (0, 0) rgba(1, 1, 1, 1)
probe uav 1 (0) r(1.0)
clear rtv 0 0.0 0.0 0.0 0.0
clear dsv 0.5
draw quad
2024-09-01 16:46:43 -07:00
probe (0, 0) rgba(1, 1, 1, 1)
probe uav 1 (0) r(1.0)
clear rtv 0 0.0 0.0 0.0 0.0
clear dsv 0.6
draw quad
2024-09-01 16:46:43 -07:00
probe (0, 0) rgba(1, 1, 1, 1)
probe uav 1 (0) r(1.0)
clear rtv 0 0.0 0.0 0.0 0.0
clear dsv 1.0
draw quad
probe (0, 0) rgba(0, 0, 0, 0)
probe uav 1 (0) r(0.0)