Exemplo n.º 1
0
        public FragmentInput VS(Vertex input)
        {
            FragmentInput output;

            output.Position = ShaderBuiltins.Mul(Ortho, new Vector4(input.Position, 0, 1));
            return(output);
        }
        public FragmentInput VS(VertexGPU input)
        {
            FragmentInput output;

            output.Position = ShaderBuiltins.Mul(Ortho, new Vector4(input.Position, 0, 1));
            output.Color    = new Vector4(input.Color_Int.X, input.Color_Int.Y, input.Color_Int.Z, 1) / InfoBuffer.ColorNormalizationFactor;
            output.Color.W  = 1;
            return(output);
        }
Exemplo n.º 3
0
        public FragmentInput VS(VertexInput input)
        {
            FragmentInput output;

            output.Position           = ShaderBuiltins.Mul(Wvp, new Vector4(input.Position, 1));
            output.Color              = input.Color;
            output.TextureCoordinates = input.TextureCoordinates;
            return(output);
        }
Exemplo n.º 4
0
        public FragmentInput VS(VertexInput input)
        {
            FragmentInput output;

            Vector4 p = ShaderBuiltins.Mul(XformView, new Vector4(input.Position, 1));
            Vector4 n = ShaderBuiltins.Mul(XformView, new Vector4(input.Normal, 0));

            output.RelativePosition = p.XYZ();
            output.RelativeNormal   = ShaderBuiltins.Sqrt(n.XYZ());

            output.Projected = ShaderBuiltins.Mul(XformProj, p);

            output.Color = input.Color;
            return(output);
        }