vkd3d/tests/hlsl/modf.shader_test
Nikolay Sivov 5fb3a91276 vkd3d-shader/hlsl: Implement the modf() intrinsic.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-15 16:43:33 +02:00

29 lines
433 B
Plaintext

[pixel shader todo(sm<4)]
float4 v;
float4 main() : sv_target
{
float4 ip;
return modf(v, ip);
}
[test]
uniform 0 float4 1.2 1.7 -1.2 -1.7
todo(sm<4) draw quad
probe (0, 0) rgba (0.2, 0.7, -0.2, -0.7) 4
[pixel shader todo(sm<4)]
float4 v;
float4 main() : sv_target
{
float4 ip;
modf(v, ip);
return ip;
}
[test]
uniform 0 float4 1.2 2.7 -1.2 -2.7
todo(sm<4) draw quad
probe (0, 0) rgba (1.0, 2.0, -1.0, -2.0)