public void AngularGradientTest(float4 inputSampler, float2 uv, float2 centerPoint, float startAngle, float arcLength, float4 startColor, float4 endColor, float4 expected)
        {
            this.inputSampler = inputSampler;
            this.CenterPoint = centerPoint;
            this.StartAngle = startAngle;
            this.ArcLength = arcLength;

            this.StartColor = startColor;
            this.EndColor = endColor;
            float4 c = main(uv);
            if (distance(expected, c) < 0.01)
            {
                Assert.Pass();
            }
            else
            {
                Assert.AreEqual(expected, c);
            }
        }
示例#2
0
 protected static float4 tex2D(float4 inputSampler, float2 uv)
 {
     return inputSampler;
 }
示例#3
0
 protected static float4 mul(float f, float4 v)
 {
     return new float4(v.Multiply(f));
 }