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

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

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

            typedef.SetVector(size);
            return(typedef);
        }
예제 #6
0
            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));
            }
예제 #7
0
 public EffectParameterDefinition(String name, HlslTypeDefinition type, HlslSemantic semantic)
 {
     Name = name;
     Type = type;
     HasStorageClass = false;
     HasSemantic = true;
     StorageClass = StorageClass.None;
     Semantic = semantic;
 }
예제 #8
0
 public EffectParameterDefinition(String name, HlslTypeDefinition type, StorageClass storageClass)
 {
     Name = name;
     Type = type;
     HasStorageClass = true;
     HasSemantic = false;
     StorageClass = storageClass;
     Semantic = new HlslSemantic();
 }
예제 #9
0
            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));
            }
예제 #10
0
 static public HlslTypeDefinition CreateMatrix(HlslType type, int rows, int columns)
 {
     HlslTypeDefinition typedef = new HlslTypeDefinition(type);
     typedef.SetMatrix(rows, columns);
     return typedef;
 }
예제 #11
0
 static public HlslTypeDefinition CreateArray(HlslType type, int size)
 {
     HlslTypeDefinition typedef = new HlslTypeDefinition(type);
     typedef.SetArray(size);
     return typedef;
 }
예제 #12
0
 // Static creation methods
 static public HlslTypeDefinition CreateVector(HlslType type, int size)
 {
     HlslTypeDefinition typedef = new HlslTypeDefinition(type);
     typedef.SetVector(size);
     return typedef;
 }