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