SystemPosition4 VS(Position4 input)
        {
            Vector2 v2 = new Vector2();

            v2 = new Vector2(1);
            v2 = new Vector2(1, 2);

            Vector3 v3 = new Vector3();

            v3 = new Vector3(1);
            v3 = new Vector3(v2, 3);
            v3 = new Vector3(1, 2, 3);

            Vector4 v4 = new Vector4();

            v4 = new Vector4(1);
            v4 = new Vector4(v3, 4);
            v4 = new Vector4(v2, 3, 4);
            v4 = new Vector4(1, 2, 3, 4);

            SystemPosition4 output;

            output.Position = input.Position;
            return(output);
        }
        [VertexShader] SystemPosition4 VS(Position4 input)
        {
            SystemPosition4 output;

            output.Position = input.Position;
            return(output);
        }
        SystemPosition4 VS(Position4 input)
        {
            Vector2 v2 = Vector2.Zero;

            v2 = Vector2.One;
            v2 = Vector2.UnitX;
            v2 = Vector2.UnitY;

            Vector3 v3 = Vector3.Zero;

            v3 = Vector3.One;
            v3 = Vector3.UnitX;
            v3 = Vector3.UnitY;
            v3 = Vector3.UnitZ;

            Vector4 v4 = Vector4.Zero;

            v4 = Vector4.One;
            v4 = Vector4.UnitX;
            v4 = Vector4.UnitY;
            v4 = Vector4.UnitZ;
            v4 = Vector4.UnitW;

            SystemPosition4 output;

            output.Position = input.Position;
            return(output);
        }
Exemple #4
0
        public SystemPosition4 VS(Position4 input)
        {
            SystemPosition4 output;

            output.Position = input.Position;
            return(output);
        }
Exemple #5
0
        Position4 VS(Position4 input)
        {
            Vector2 v2 = Vector2.Zero;

            v2 = Vector2.One;
            v2 = Vector2.UnitX;
            v2 = Vector2.UnitY;

            Vector3 v3 = Vector3.Zero;

            v3 = Vector3.One;
            v3 = Vector3.UnitX;
            v3 = Vector3.UnitY;
            v3 = Vector3.UnitZ;

            Vector4 v4 = Vector4.Zero;

            v4 = Vector4.One;
            v4 = Vector4.UnitX;
            v4 = Vector4.UnitY;
            v4 = Vector4.UnitZ;
            v4 = Vector4.UnitW;

            return(input);
        }
        private SystemPosition4 CustomMethod(Position4 vert)
        {
            SystemPosition4 ret;

            ret.Position = vert.Position + UniformV4;
            return(ret);
        }
Exemple #7
0
        public Position4 PercentEqualsVS(Position4 input)
        {
            float x = 5;

            x %= input.Position.Y;
            return(input);
        }
Exemple #8
0
        SystemPosition4 VS(Position4 input)
        {
            SystemPosition4 output;

            output.Position = new Vector4();
            return(output);
        }
        public Position4 VS(Position4 input)
        {
            Position4 output;
            Matrix4x4 result = NoAttributeMatrix * Matrix0 * Matrix1 * Matrix2 * Matrix3 * Matrix4 * Matrix00;

            output.Position = Mul(result, input.Position);
            return(output);
        }
        public Position4 VS(Position4 input)
        {
            float   f  = 0;
            Vector2 v2 = new Vector2(0, 0);
            Vector3 v3 = new Vector3(0, 0, 0);
            Vector4 v4 = new Vector4(0, 0, 0, 0);
            float   r  = 0;
            Vector2 r2 = new Vector2(0, 0);
            Vector3 r3 = new Vector3(0, 0, 0);
            Vector4 r4 = new Vector4(0, 0, 0, 0);

            // Abs
            r  = Abs(f);
            r2 = Abs(v2);
            r3 = Abs(v3);
            r4 = Abs(v4);

            // Acos
            r  = Acos(f);
            r2 = Acos(v2);
            r3 = Acos(v3);
            r4 = Acos(v4);

            // Clamp
            r  = Clamp(f, 0, 10);
            r2 = Clamp(v2, new Vector2(0, 0), new Vector2(10, 10));
            r3 = Clamp(v3, new Vector3(0, 0, 0), new Vector3(10, 10, 10));
            r4 = Clamp(v4, new Vector4(0, 0, 0, 0), new Vector4(10, 10, 10, 10));

            // Pow
            r  = Pow(f, 10);
            r2 = Pow(v2, new Vector2(10, 12));
            r3 = Pow(v3, new Vector3(10, 12, 14));
            r4 = Pow(v4, new Vector4(10, 12, 14, 16));

            // Saturate
            r  = Saturate(f);
            r2 = Saturate(v2);
            r3 = Saturate(v3);
            r4 = Saturate(v4);

            // Tan
            r  = Tan(f);
            r2 = Tan(v2);
            r3 = Tan(v3);
            r4 = Tan(v4);

            // Mod
            r  = Mod(f, 2);
            r2 = Mod(v2, new Vector2(2, 4));
            r3 = Mod(v3, new Vector3(2, 4, 6));
            r4 = Mod(v4, new Vector4(2, 4, 6, 8));

            // ClipToTextureCoordinates
            r2 = ClipToTextureCoordinates(v4);
            return(input);
        }
        [VertexShader] SystemPosition4 VS(Position4 input)
        {
            SystemPosition4 output;
            PointLightInfo  a        = PointLights.PointLights[0];
            Vector4         position = new Vector4(a.Position.XYZ(), 10);

            output.Position = input.Position;
            return(output);
        }
Exemple #12
0
        SystemPosition4 VS(Position4 input)
        {
            Position4       reversed = Reverse(input);
            Position4       shuffled = ShufflePosition4(reversed);
            SystemPosition4 output;

            output.Position = shuffled.Position;
            return(output);
        }
Exemple #13
0
        public Position4 VS(Position4 input)
        {
            input.Position.X += CustomField.F2_4.X;
            input.Position.Y += CustomField.F1_3;
            input.Position.Z -= CustomField.F2_1.Y;
            input.Position.W -= CustomField.F3_0.Z;

            return(input);
        }
        SystemPosition4 VS(Position4 input)
        {
            Vector2 v2 = new Vector2(VS_M0.M11, VS_M1.M22);
            Vector4 v4 = Sample(VS_T0, VS_S0, v2);

            SystemPosition4 output;

            output.Position = v4;
            return(output);
        }
        public SystemPosition4 VS(Position4 input)
        {
            SystemPosition4 output;
            float           a = MathF.Max(0f, 10f);
            float           b = MathF.Min(0f, 10f);
            float           c = MathF.Pow(2, 10);

            output.Position = new Vector4(a, b, c, 1);
            return(output);
        }
        public SystemPosition4 PercentEqualsVS(Position4 input)
        {
            float x = 5;

            x %= input.Position.Y;
            SystemPosition4 output;

            output.Position = input.Position;
            return(output);
        }
        SystemPosition4 VS(Position4 input)
        {
            Position4       reversed = Reverse(input);
            Position4       shuffled = ShufflePosition4(reversed);
            SystemPosition4 output;

            output.Position    = shuffled.Position;
            output.Position.X  = CustomAbs(output.Position.X);
            output.Position.X += HelperMethod(output.Position.X);
            return(output);
        }
        public SystemPosition4 VS(Position4 input)
        {
            Vector4   outputPos;
            Matrix4x4 result = NoAttributeMatrix * Matrix0 * Matrix1 * Matrix2 * Matrix3 * Matrix4 * Matrix00;

            outputPos = Mul(result, input.Position);

            SystemPosition4 output;

            output.Position = outputPos;
            return(output);
        }
Exemple #19
0
        public SystemPosition4 VS(Position4 input)
        {
            input.Position.X += CustomField.F2_4.X;
            input.Position.Y += CustomField.F1_3;
            input.Position.Z -= CustomField.F2_1.Y;
            input.Position.W -= CustomField.F3_0.Z;

            SystemPosition4 output;

            output.Position = input.Position;
            return(output);
        }
        public SystemPosition4 VS(Position4 input)
        {
            Matrix4x4 newMat = new Matrix4x4(
                InputMatrix.M11, InputMatrix.M12, InputMatrix.M13, 0,
                InputMatrix.M21, InputMatrix.M22, InputMatrix.M23, 0,
                InputMatrix.M31, InputMatrix.M32, InputMatrix.M33, 0,
                0, 0, 0, 1);

            SystemPosition4 output;

            output.Position = Vector4.Transform(input.Position, newMat);
            return(output);
        }
Exemple #21
0
        public SystemPosition4 VS(Position4 input)
        {
            Vector2 xy = Vector2.Zero;
            Vector2 zw;

            MyFunc(input.Position, ref xy, out zw);

            SystemPosition4 output;

            output.Position.X = xy.X;
            output.Position.Y = xy.Y;
            output.Position.Z = zw.X;
            output.Position.W = zw.Y;
            return(output);
        }
        SystemPosition4 VS(Position4 input)
        {
            Vector2 v2 = new Vector2();
            float   f  = v2.GetComponent(0);

            v2.SetComponent(1, f);

            Vector3 v3 = new Vector3();

            f = v3.GetComponent(0);
            v3.SetComponent(1, f);

            Vector4 v4 = new Vector4();

            f = v4.GetComponent(0);
            v4.SetComponent(1, f);

            SystemPosition4 output;

            output.Position = input.Position;
            return(output);
        }
Exemple #23
0
        [VertexShader] SystemPosition4 VS(Position4 input)
        {
            const int MyConst = 10;

            for (int i = 0; i < MyConst; i++)
            {
            }
            for (int i = 0; i < MyOtherConst; i++)
            {
            }

            SystemPosition4 output;
            Vector4         color = Vector4.Zero;

            for (int i = 0; i < PointLightsInfo.MaxLights; i++)
            {
                PointLightInfo a = PointLights.PointLights[i];
                color += new Vector4(a.Color, MyConst);
            }
            output.Position = input.Position;
            return(output);
        }
        Position4 VS(Position4 input)
        {
            Vector2 v2 = new Vector2();

            v2 = new Vector2(1);
            v2 = new Vector2(1, 2);

            Vector3 v3 = new Vector3();

            v3 = new Vector3(1);
            v3 = new Vector3(v2, 3);
            v3 = new Vector3(1, 2, 3);

            Vector4 v4 = new Vector4();

            v4 = new Vector4(1);
            v4 = new Vector4(v3, 4);
            v4 = new Vector4(v2, 3, 4);
            v4 = new Vector4(1, 2, 3, 4);

            return(input);
        }
 Vector4 FS(Position4 input)
 {
     return(input.Position);
 }
 Position4 VS(Position4 input)
 {
     return(input);
 }
Exemple #27
0
        public SystemPosition4 VS(Position4 input)
        {
            float f = 0;

            float   r  = 0;
            Vector2 r2 = new Vector2(0, 0);
            Vector3 r3 = new Vector3(0, 0, 0);
            Vector4 r4 = new Vector4(0, 0, 0, 0);

            // Abs
            r  = Abs(f);
            r2 = Abs(VH.V2);
            r3 = Abs(VH.V3);
            r4 = Abs(VH.V4);

            // Acos
            r  = Acos(f);
            r2 = Acos(VH.V2);
            r3 = Acos(VH.V3);
            r4 = Acos(VH.V4);

            // Clamp
            r  = Clamp(f, 0, 10);
            r2 = Clamp(VH.V2, new Vector2(0, 0), new Vector2(10, 10));
            r3 = Clamp(VH.V3, new Vector3(0, 0, 0), new Vector3(10, 10, 10));
            r4 = Clamp(VH.V4, new Vector4(0, 0, 0, 0), new Vector4(10, 10, 10, 10));

            // Cos
            r  = Cos(f);
            r2 = Cos(VH.V2);
            r3 = Cos(VH.V3);
            r4 = Cos(VH.V4);

            // Floor
            r  = Floor(f);
            r2 = Floor(VH.V2);
            r3 = Floor(VH.V3);
            r4 = Floor(VH.V4);

            // Frac
            r  = Frac(f);
            r2 = Frac(VH.V2);
            r3 = Frac(VH.V3);
            r4 = Frac(VH.V4);

            // Lerp
            r  = Lerp(f, f, f);
            r2 = Lerp(VH.V2, VH.V2, f);
            r3 = Lerp(VH.V3, VH.V3, f);
            r4 = Lerp(VH.V4, VH.V4, f);

            // Pow
            r  = Pow(f, 10);
            r2 = Pow(VH.V2, new Vector2(10, 12));
            r3 = Pow(VH.V3, new Vector3(10, 12, 14));
            r4 = Pow(VH.V4, new Vector4(10, 12, 14, 16));

            // Saturate
            r  = Saturate(f);
            r2 = Saturate(VH.V2);
            r3 = Saturate(VH.V3);
            r4 = Saturate(VH.V4);

            // Sin
            r  = Sin(f);
            r2 = Sin(VH.V2);
            r3 = Sin(VH.V3);
            r4 = Sin(VH.V4);

            // SmoothStep
            r  = SmoothStep(1f, 2f, f);
            r2 = SmoothStep(new Vector2(1f, 1f), new Vector2(2f, 2f), VH.V2);
            r3 = SmoothStep(new Vector3(1f, 1f, 1f), new Vector3(2f, 2f, 2f), VH.V3);
            r4 = SmoothStep(new Vector4(1f, 1f, 1f, 1f), new Vector4(2f, 2f, 2f, 2f), VH.V4);

            // Tan
            r  = Tan(f);
            r2 = Tan(VH.V2);
            r3 = Tan(VH.V3);
            r4 = Tan(VH.V4);

            // Mod
            r  = Mod(f, 2);
            r2 = Mod(VH.V2, new Vector2(2, 4));
            r3 = Mod(VH.V3, new Vector3(2, 4, 6));
            r4 = Mod(VH.V4, new Vector4(2, 4, 6, 8));

            // ClipToTextureCoordinates
            r2 = ClipToTextureCoordinates(VH.V4);
            Vector4 v4 = VH.V4;

            r2 = ClipToTextureCoordinates(v4);

            SystemPosition4 output;

            output.Position = input.Position;

            return(output);
        }
Exemple #28
0
 private Position4 ShufflePosition4(Position4 vert)
 {
     vert.Position = ShuffleVector4(vert.Position);
     return(vert);
 }
Exemple #29
0
 private Position4 Reverse(Position4 vert)
 {
     vert.Position   = vert.Position.WZYX();
     vert.Position.X = Invert(3);
     return(vert);
 }
Exemple #30
0
        Position4 VS(Position4 input)
        {
            Vector2 v2 = new Vector2(1, 2);
            Vector2 r2 = Vector2.Abs(v2);

            r2 = Vector2.Add(v2, v2);
            r2 = Vector2.Clamp(v2, v2, v2);
            float r = Vector2.Distance(v2, v2);

            r  = Vector2.DistanceSquared(v2, v2);
            r2 = Vector2.Divide(v2, v2);
            r2 = Vector2.Divide(v2, r);
            r  = Vector2.Dot(v2, v2);
            r2 = Vector2.Lerp(v2, v2, 0.75f);
            r2 = Vector2.Max(v2, v2);
            r2 = Vector2.Min(v2, v2);
            r2 = Vector2.Multiply(v2, v2);
            r2 = Vector2.Multiply(v2, r);
            r2 = Vector2.Multiply(r, v2);
            r2 = Vector2.Negate(v2);
            r2 = Vector2.Normalize(v2);
            r2 = Vector2.Reflect(v2, v2);
            r2 = Vector2.SquareRoot(v2);
            r2 = Vector2.Subtract(v2, v2);
            r  = v2.Length();
            r  = v2.LengthSquared();

            Vector3 v3 = new Vector3(1, 2, 3);
            Vector3 r3 = Vector3.Abs(v3);

            r3 = Vector3.Add(v3, v3);
            r3 = Vector3.Clamp(v3, v3, v3);
            r3 = Vector3.Cross(v3, v3);
            r  = Vector3.Distance(v3, v3);
            r  = Vector3.DistanceSquared(v3, v3);
            r3 = Vector3.Divide(v3, v3);
            r3 = Vector3.Divide(v3, r);
            r  = Vector3.Dot(v3, v3);
            r3 = Vector3.Lerp(v3, v3, 0.75f);
            r3 = Vector3.Max(v3, v3);
            r3 = Vector3.Min(v3, v3);
            r3 = Vector3.Multiply(v3, v3);
            r3 = Vector3.Multiply(v3, r);
            r3 = Vector3.Multiply(r, v3);
            r3 = Vector3.Negate(v3);
            r3 = Vector3.Normalize(v3);
            r3 = Vector3.Reflect(v3, v3);
            r3 = Vector3.SquareRoot(v3);
            r3 = Vector3.Subtract(v3, v3);
            r  = v3.Length();
            r  = v3.LengthSquared();

            Vector4 v4 = new Vector4(1, 2, 3, 4);
            Vector4 r4 = Vector4.Abs(v4);

            r4 = Vector4.Add(v4, v4);
            r4 = Vector4.Clamp(v4, v4, v4);
            r  = Vector4.Distance(v4, v4);
            r  = Vector4.DistanceSquared(v4, v4);
            r4 = Vector4.Divide(v4, v4);
            r4 = Vector4.Divide(v4, r);
            r  = Vector4.Dot(v4, v4);
            r4 = Vector4.Lerp(v4, v4, 0.75f);
            r4 = Vector4.Max(v4, v4);
            r4 = Vector4.Min(v4, v4);
            r4 = Vector4.Multiply(v4, v4);
            r4 = Vector4.Multiply(v4, r);
            r4 = Vector4.Multiply(r, v4);
            r4 = Vector4.Negate(v4);
            r4 = Vector4.Normalize(v4);
            r4 = Vector4.SquareRoot(v4);
            r4 = Vector4.Subtract(v4, v4);
            r  = v4.Length();
            r  = v4.LengthSquared();

            return(input);
        }