Defines an hlsl type, making it easy to edit
 public HlslSemantic(HlslTypeDefinition type, String name, bool multipleResourcesSupported)
 {
     Type = type;
     Name = name;
     MultipleResourcesSupported = multipleResourcesSupported;
     ResourceNumber             = -1;
 }
        static public HlslTypeDefinition CreateArray(HlslType type, int size)
        {
            HlslTypeDefinition typedef = new HlslTypeDefinition(type);

            typedef.SetArray(size);
            return(typedef);
        }
        static public HlslTypeDefinition CreateMatrix(HlslType type, int rows, int columns)
        {
            HlslTypeDefinition typedef = new HlslTypeDefinition(type);

            typedef.SetMatrix(rows, columns);
            return(typedef);
        }
 public HlslSemantic(HlslTypeDefinition type, String name, bool multipleResourcesSupported)
 {
     Type = type;
     Name = name;
     MultipleResourcesSupported = multipleResourcesSupported;
     ResourceNumber = -1;
 }
        // Static creation methods
        static public HlslTypeDefinition CreateVector(HlslType type, int size)
        {
            HlslTypeDefinition typedef = new HlslTypeDefinition(type);

            typedef.SetVector(size);
            return(typedef);
        }
            static VertexShader()
            {
                Input  = new List <HlslSemantic>();
                Output = new List <HlslSemantic>();

                // Initialize input semantics
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "BINORMAL", true));
                Input.Add(new HlslSemantic(new HlslTypeDefinition(HlslType.Uint), "BLENDINDICES", true));
                Input.Add(new HlslSemantic(new HlslTypeDefinition(HlslType.Float), "BLENDWEIGHT", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "COLOR", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "NORMAL", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "POSITION", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "POSITIONT", false));
                Input.Add(new HlslSemantic(new HlslTypeDefinition(HlslType.Float), "PSIZE", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "TANGENT", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 1), "TEXCOORD", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 2), "TEXCOORD", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 3), "TEXCOORD", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "TEXCOORD", true));

                // Initialize output semantics
                Output.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "COLOR", true));
                Output.Add(new HlslSemantic(new HlslTypeDefinition(HlslType.Float), "FOG", false));
                Output.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "POSITION", true));
                Output.Add(new HlslSemantic(new HlslTypeDefinition(HlslType.Float), "PSIZE", false));
                Output.Add(new HlslSemantic(new HlslTypeDefinition(HlslType.Float), "TESSFACTOR", true));
                Output.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 1), "TEXCOORD", true));
                Output.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 2), "TEXCOORD", true));
                Output.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 3), "TEXCOORD", true));
                Output.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "TEXCOORD", true));
            }
 public EffectParameterDefinition(String name, HlslTypeDefinition type, HlslSemantic semantic)
 {
     Name = name;
     Type = type;
     HasStorageClass = false;
     HasSemantic = true;
     StorageClass = StorageClass.None;
     Semantic = semantic;
 }
 public EffectParameterDefinition(String name, HlslTypeDefinition type, StorageClass storageClass)
 {
     Name = name;
     Type = type;
     HasStorageClass = true;
     HasSemantic = false;
     StorageClass = storageClass;
     Semantic = new HlslSemantic();
 }
            static PixelShader()
            {
                Input  = new List <HlslSemantic>();
                Output = new List <HlslSemantic>();

                // Initialize input semantics
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "COLOR", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 1), "TEXCOORD", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 2), "TEXCOORD", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 3), "TEXCOORD", true));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "TEXCOORD", true));
                Input.Add(new HlslSemantic(new HlslTypeDefinition(HlslType.Float), "VFACE", false));
                Input.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 2), "VPOS", false));

                // Initialize output semantics
                Output.Add(new HlslSemantic(HlslTypeDefinition.CreateVector(HlslType.Float, 4), "COLOR", true));
                Output.Add(new HlslSemantic(new HlslTypeDefinition(HlslType.Float), "DEPTH", true));
            }
 static public HlslTypeDefinition CreateMatrix(HlslType type, int rows, int columns)
 {
     HlslTypeDefinition typedef = new HlslTypeDefinition(type);
     typedef.SetMatrix(rows, columns);
     return typedef;
 }
 static public HlslTypeDefinition CreateArray(HlslType type, int size)
 {
     HlslTypeDefinition typedef = new HlslTypeDefinition(type);
     typedef.SetArray(size);
     return typedef;
 }
 // Static creation methods
 static public HlslTypeDefinition CreateVector(HlslType type, int size)
 {
     HlslTypeDefinition typedef = new HlslTypeDefinition(type);
     typedef.SetVector(size);
     return typedef;
 }