From b65c4501014f2604ca2494d0bc8df35021792dab Mon Sep 17 00:00:00 2001 From: Francisco Casas Date: Mon, 16 Jan 2023 17:25:50 -0300 Subject: [PATCH] vkd3d-shader/hlsl: Add additional tests for sin() and cos(). --- tests/trigonometry.shader_test | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/trigonometry.shader_test b/tests/trigonometry.shader_test index afc09221..fef85ca0 100644 --- a/tests/trigonometry.shader_test +++ b/tests/trigonometry.shader_test @@ -29,3 +29,31 @@ probe (12, 0) rgba (-0.53657292, 0.84385396, 0.0, 0.0) 1024 probe (13, 0) rgba ( 0.42016704, 0.90744678, 0.0, 0.0) 1024 probe (14, 0) rgba ( 0.99060736, 0.13673722, 0.0, 0.0) 1024 probe (15, 0) rgba ( 0.65028784, -0.75968791, 0.0, 0.0) 1024 + + +[pixel shader todo] +uniform float4 a; + +float4 main() : sv_target +{ + return round(1000 * sin(a)); +} + +[test] +uniform 0 float4 0.0 0.52359877 2.61799387 3.14159265 +todo draw quad +todo probe all rgba (0.0, 500.0, 500.0, 0.0) + + +[pixel shader todo] +uniform float4 a; + +float4 main() : sv_target +{ + return round(1000 * cos(a)); +} + +[test] +uniform 0 float4 0.0 0.78539816 1.57079632 2.35619449 +todo draw quad +todo probe all rgba (1000.0, 707.0, -0.0, -707.0)