2022-03-21 18:42:21 -07:00
|
|
|
[require]
|
|
|
|
shader model >= 4.0
|
|
|
|
|
|
|
|
[input layout]
|
2024-08-01 18:03:46 -07:00
|
|
|
0 r32g32b32a32-float texcoord
|
2022-03-21 18:42:21 -07:00
|
|
|
|
2024-01-24 11:11:17 -08:00
|
|
|
[vb 0]
|
2022-03-21 18:42:21 -07:00
|
|
|
0.0 1.0 0.0 1.0
|
|
|
|
1.0 0.0 0.0 1.0
|
|
|
|
0.0 0.0 1.0 1.0
|
|
|
|
|
|
|
|
[vertex shader]
|
|
|
|
void main(uint id : sv_vertexid, nointerpolation inout float4 t : texcoord, out float4 pos : sv_position)
|
|
|
|
{
|
|
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
float4 main(nointerpolation float4 t : texcoord) : sv_target
|
|
|
|
{
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-10-21 07:23:27 -07:00
|
|
|
todo(msl) draw triangle list 3
|
2024-09-30 03:04:31 -07:00
|
|
|
probe (0, 0, 640, 480) rgba (0.0, 1.0, 0.0, 1.0)
|
2023-09-22 09:23:46 -07:00
|
|
|
|
|
|
|
[vertex shader]
|
|
|
|
struct ps_input
|
|
|
|
{
|
|
|
|
nointerpolation float4 t : texcoord;
|
|
|
|
};
|
|
|
|
|
|
|
|
void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_position)
|
|
|
|
{
|
|
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
struct ps_input
|
|
|
|
{
|
|
|
|
nointerpolation float4 t : texcoord;
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 main(ps_input input) : sv_target
|
|
|
|
{
|
|
|
|
return input.t;
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-10-21 07:23:27 -07:00
|
|
|
todo(msl) draw triangle list 3
|
2024-09-30 03:04:31 -07:00
|
|
|
probe (0, 0, 640, 480) rgba (0.0, 1.0, 0.0, 1.0)
|
2023-09-22 09:23:46 -07:00
|
|
|
|
|
|
|
[vertex shader]
|
|
|
|
struct ps_input
|
|
|
|
{
|
|
|
|
nointerpolation float4 t : texcoord;
|
|
|
|
};
|
|
|
|
|
|
|
|
void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_position)
|
|
|
|
{
|
|
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
struct ps_input
|
|
|
|
{
|
|
|
|
float4 t : texcoord;
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 main(nointerpolation ps_input input) : sv_target
|
|
|
|
{
|
|
|
|
return input.t;
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-10-21 07:23:27 -07:00
|
|
|
todo(msl) draw triangle list 3
|
2024-09-30 03:04:31 -07:00
|
|
|
probe (0, 0, 640, 480) rgba (0.0, 1.0, 0.0, 1.0)
|
2023-09-22 09:23:46 -07:00
|
|
|
|
|
|
|
[vertex shader]
|
|
|
|
struct ps_input
|
|
|
|
{
|
|
|
|
nointerpolation float4 t : texcoord;
|
|
|
|
};
|
|
|
|
|
|
|
|
void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_position)
|
|
|
|
{
|
|
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
|
|
}
|
|
|
|
|
2023-09-21 06:11:26 -07:00
|
|
|
[pixel shader]
|
2023-09-22 09:23:46 -07:00
|
|
|
struct ps_input
|
|
|
|
{
|
|
|
|
nointerpolation float4 t : texcoord;
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 main(centroid ps_input input) : sv_target
|
|
|
|
{
|
|
|
|
return input.t;
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-10-21 07:23:27 -07:00
|
|
|
todo(msl) draw triangle list 3
|
2024-09-30 03:04:31 -07:00
|
|
|
probe (0, 0, 640, 480) rgba (0.0, 1.0, 0.0, 1.0)
|
2023-09-22 09:23:46 -07:00
|
|
|
|
|
|
|
[vertex shader]
|
|
|
|
struct ps_input
|
|
|
|
{
|
|
|
|
nointerpolation float4 t : texcoord;
|
|
|
|
};
|
|
|
|
|
|
|
|
void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_position)
|
|
|
|
{
|
|
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
|
|
}
|
|
|
|
|
2023-09-21 06:13:27 -07:00
|
|
|
[pixel shader]
|
2023-09-22 09:23:46 -07:00
|
|
|
struct ps_input
|
|
|
|
{
|
|
|
|
centroid float4 t : texcoord;
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 main(nointerpolation ps_input input) : sv_target
|
|
|
|
{
|
|
|
|
return input.t;
|
|
|
|
}
|
|
|
|
|
2024-01-19 06:34:42 -08:00
|
|
|
[require]
|
|
|
|
shader model >= 4.0
|
|
|
|
shader model < 6.0
|
|
|
|
|
2023-09-22 09:23:46 -07:00
|
|
|
[test]
|
2024-10-21 07:23:27 -07:00
|
|
|
todo(msl) draw triangle list 3
|
2024-09-30 03:04:31 -07:00
|
|
|
probe (0, 0, 640, 480) rgba (0.0, 1.0, 0.0, 1.0)
|
2023-09-22 09:23:46 -07:00
|
|
|
|
2024-01-19 06:34:42 -08:00
|
|
|
% Centroid for SM 6.
|
|
|
|
[require]
|
|
|
|
shader model >= 6.0
|
|
|
|
|
|
|
|
[test]
|
|
|
|
draw triangle list 3
|
2024-03-08 14:19:56 -08:00
|
|
|
probe (320,240) rgba (0.250390589, 0.499088615, 0.250520796, 1.0) 4
|
2024-01-19 06:34:42 -08:00
|
|
|
|
|
|
|
[require]
|
|
|
|
shader model >= 4.0
|
|
|
|
|
|
|
|
|
2023-09-21 06:13:27 -07:00
|
|
|
[vertex shader fail todo]
|
2023-09-22 09:23:46 -07:00
|
|
|
struct ps_input
|
|
|
|
{
|
|
|
|
nointerpolation centroid float4 t : texcoord;
|
|
|
|
};
|
|
|
|
|
|
|
|
void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_position)
|
|
|
|
{
|
|
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
|
|
}
|
|
|
|
|
2023-09-21 06:11:26 -07:00
|
|
|
[vertex shader]
|
2023-09-22 09:23:46 -07:00
|
|
|
struct ps_input
|
|
|
|
{
|
|
|
|
nointerpolation float4 t : texcoord;
|
|
|
|
};
|
|
|
|
|
|
|
|
void main(uint id : sv_vertexid, inout centroid ps_input input, out float4 pos : sv_position)
|
|
|
|
{
|
|
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
|
|
}
|