Giovanni Mascellani (@giomasce) commented about tests/sampler.shader_test:
[test] draw quad probe all rgba (0.25, 0, 0.25, 0)
+[pixel shader] +SamplerState s; +Texture2D t;
+float4 main() : sv_target +{
- return t.SampleGrad(s, float2(0.5, 0.5), float2(0, 0), float2(0, 0));
Given this is a relatively complex operation, it wouldn't be bad to test some less trivial input values and check that our implementation is reasonably similar to native.