Beispiel #1
0
 public static Type GetAssignmentType(this EffectAssignmentType type)
 {
     return(type.GetAttributeValue <AssignmentTypeAttribute, Type>((a, v) =>
     {
         if (!a.Any())
         {
             return null;
         }
         return a.First().Type;
     }));
 }
Beispiel #2
0
        public static bool IsArrayAssignemnt(this EffectAssignmentType assignmentType)
        {
            switch (assignmentType)
            {
            case EffectAssignmentType.BlendEnable:
            case EffectAssignmentType.SrcBlend:
            case EffectAssignmentType.DestBlend:
            case EffectAssignmentType.BlendOp:
            case EffectAssignmentType.SrcBlendAlpha:
            case EffectAssignmentType.DestBlendAlpha:
            case EffectAssignmentType.BlendOpAlpha:
            case EffectAssignmentType.RenderTargetWriteMask:
                return(true);

            default:
                return(false);
            }
        }