Пример #1
0
 public FieldDefinition(
     string name,
     TypeReference type,
     GeometrySemantic semanticType,
     int arrayElementCount,
     AlignmentInfo size)
 {
     Name              = name;
     Type              = type;
     GeometrySemantic  = semanticType;
     ArrayElementCount = arrayElementCount;
     Alignment         = size;
 }
Пример #2
0
        public ShaderBuiltin(GeometrySemantic semantic)
        {
            Stage = ShaderStage.Geometry;
            switch (semantic)
            {
            case GeometrySemantic.ClipDistance:
                Semantic = BuiltinSemantic.ClipDistance;
                break;

            case GeometrySemantic.Instance:
                Semantic = BuiltinSemantic.Instance;
                break;

            case GeometrySemantic.Layer:
                Semantic = BuiltinSemantic.Layer;
                break;

            case GeometrySemantic.PointSize:
                Semantic = BuiltinSemantic.PointSize;
                break;

            case GeometrySemantic.Position:
                Semantic = BuiltinSemantic.Position;
                break;

            case GeometrySemantic.Primitive:
                Semantic = BuiltinSemantic.Primitive;
                break;

            case GeometrySemantic.Viewport:
                Semantic = BuiltinSemantic.Viewport;
                break;

            case GeometrySemantic.PerVertex:
                Semantic = BuiltinSemantic.PerVertex;
                break;

            default:
                Semantic = BuiltinSemantic.None;
                break;
            }
        }
Пример #3
0
 public GeometrySemanticAttribute(GeometrySemantic semantic)
 {
     Semantic = semantic;
 }