2021-11-19 06:38:41 -08:00
|
|
|
[pixel shader]
|
2023-09-14 02:29:24 -07:00
|
|
|
uniform float4 u;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
2021-11-19 06:38:41 -08:00
|
|
|
{
|
|
|
|
return round(u);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2022-03-07 17:55:41 -08:00
|
|
|
uniform 0 float4 -0.4 -6.6 7.6 3.4
|
2023-11-26 19:29:14 -08:00
|
|
|
draw quad
|
2022-03-07 17:55:41 -08:00
|
|
|
probe all rgba (0.0, -7.0, 8.0, 3.0) 4
|
2021-11-19 06:38:41 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[pixel shader]
|
2023-09-14 02:29:24 -07:00
|
|
|
uniform float4 u;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
2021-11-19 06:38:41 -08:00
|
|
|
{
|
|
|
|
float a = round(u.r);
|
|
|
|
int2 b = round(u.gb);
|
|
|
|
float4 res = float4(b, a, u.a);
|
|
|
|
return round(res);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2022-03-07 17:55:41 -08:00
|
|
|
uniform 0 float4 -0.4 -6.6 7.6 3.4
|
2023-11-26 19:29:14 -08:00
|
|
|
draw quad
|
2022-03-07 17:55:41 -08:00
|
|
|
probe all rgba (-7.0, 8.0, 0.0, 3.0) 4
|
2022-02-02 04:46:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[pixel shader]
|
2023-09-14 02:29:24 -07:00
|
|
|
uniform float4 u;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
2022-02-02 04:46:13 -08:00
|
|
|
{
|
2022-03-07 17:55:43 -08:00
|
|
|
int4 i = u;
|
|
|
|
return round(i);
|
2022-02-02 04:46:13 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2022-03-07 17:55:43 -08:00
|
|
|
uniform 0 float4 -1 0 2 10
|
2023-11-26 19:29:14 -08:00
|
|
|
draw quad
|
2022-02-02 04:46:13 -08:00
|
|
|
probe all rgba (-1.0, 0.0, 2.0, 10.0) 4
|