2024-04-14 17:33:15 -07:00
|
|
|
[require]
|
|
|
|
shader model >= 4.0
|
|
|
|
|
|
|
|
[dsv]
|
|
|
|
size (2d, 640, 480)
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
float depth;
|
|
|
|
|
|
|
|
float main() : SV_Depth
|
|
|
|
{
|
|
|
|
return depth;
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float 0.0
|
|
|
|
clear dsv 1.0
|
|
|
|
depth less
|
2024-05-01 15:49:35 -07:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe dsv (0,0) r (0.0)
|
2024-04-14 17:33:15 -07:00
|
|
|
|
|
|
|
uniform 0 float 0.75
|
|
|
|
clear dsv 1.0
|
2024-05-01 15:49:35 -07:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe dsv (0,0) r (0.75)
|
2024-04-14 17:33:15 -07:00
|
|
|
|
|
|
|
clear dsv 0.5
|
|
|
|
depth greater
|
2024-05-01 15:49:35 -07:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe dsv (0,0) r (0.75)
|
2024-04-14 17:33:15 -07:00
|
|
|
|
|
|
|
depth less
|
|
|
|
clear dsv 0.5
|
2024-05-01 15:49:35 -07:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe dsv (0,0) r (0.5)
|
2024-04-14 17:37:37 -07:00
|
|
|
|
|
|
|
|
|
|
|
[require]
|
|
|
|
shader model >= 5.0
|
|
|
|
|
|
|
|
[rtv 0]
|
2024-08-01 18:03:46 -07:00
|
|
|
format r32g32b32a32-float
|
2024-04-14 17:37:37 -07:00
|
|
|
size (2d, 640, 480)
|
|
|
|
|
|
|
|
[vertex shader]
|
|
|
|
float2 depth;
|
|
|
|
|
|
|
|
void main(float4 in_position : POSITION, out float4 out_position : SV_Position)
|
|
|
|
{
|
|
|
|
out_position = in_position;
|
|
|
|
out_position.z = depth.x;
|
|
|
|
}
|
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
float2 depth;
|
|
|
|
|
|
|
|
float4 main(out float out_depth : SV_DepthLessEqual) : SV_Target
|
|
|
|
{
|
|
|
|
out_depth = depth.y;
|
|
|
|
return float4(0.0f, 1.0f, 0.0f, 1.0f);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float4 0.75 0.75 0.0 0.0
|
|
|
|
clear rtv 0 1.0 1.0 1.0 1.0
|
|
|
|
clear dsv 0.5
|
|
|
|
depth greater equal
|
2024-05-02 08:11:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.0, 1.0, 0.0, 1.0)
|
|
|
|
probe dsv (0,0) r (0.75)
|
2024-04-14 17:37:37 -07:00
|
|
|
|
|
|
|
uniform 0 float4 0.75 0.375 0.0 0.0
|
|
|
|
clear rtv 0 1.0 1.0 1.0 1.0
|
|
|
|
clear dsv 0.5
|
2024-05-02 08:11:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
|
|
|
|
probe dsv (0,0) r (0.5)
|
2024-04-14 17:37:37 -07:00
|
|
|
|
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
float2 depth;
|
|
|
|
|
|
|
|
float4 main(out float out_depth : SV_DepthGreaterEqual) : SV_Target
|
|
|
|
{
|
|
|
|
out_depth = depth.y;
|
|
|
|
return float4(0.0f, 1.0f, 0.0f, 1.0f);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float4 0.75 0.75 0.0 0.0
|
|
|
|
clear rtv 0 1.0 1.0 1.0 1.0
|
|
|
|
clear dsv 0.5
|
|
|
|
depth greater equal
|
2024-05-02 08:11:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.0, 1.0, 0.0, 1.0)
|
|
|
|
probe dsv (0,0) r (0.75)
|
2024-04-14 17:37:37 -07:00
|
|
|
|
|
|
|
uniform 0 float4 0.375 0.625 0.0 0.0
|
|
|
|
clear rtv 0 1.0 1.0 1.0 1.0
|
|
|
|
clear dsv 0.5
|
2024-05-02 08:11:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.0, 1.0, 0.0, 1.0)
|
|
|
|
probe dsv (0,0) r (0.625)
|
2024-04-14 17:37:37 -07:00
|
|
|
|
|
|
|
uniform 0 float4 0.375 0.375 0.0 0.0
|
|
|
|
clear rtv 0 1.0 1.0 1.0 1.0
|
|
|
|
clear dsv 0.5
|
2024-05-02 08:11:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
|
|
|
|
probe dsv (0,0) r (0.5)
|