Giovanni Mascellani (@giomasce) commented about tests/hlsl/inverse-trig.shader_test:
+uniform 0 float4 0.5 0.0 0.0 0.0 +todo draw quad +probe all rgba (1.04715133, 0.0, 0.0, 0.0) 256
+uniform 0 float4 1.0 0.0 0.0 0.0 +todo draw quad +probe all rgba (0.0, 0.0, 0.0, 0.0) 128
+[pixel shader todo] +uniform float4 a;
+float4 main() : sv_target +{
- float4 result = float4(asin(a.x), 0.0, 0.0, 0.0);
- // Quantize to cover implementation variations.
- return round(result * 20000.0);
Why do you use two different approaches for sine (just setting the ULP tolerance) and cosine (quantizing and handling differently SM1-5 and SM6)? Not that I have a big problem with it, mostly curious.