public SwizzleOperation(SwizzleMask mask) { this.mask = mask; inputDesc = new PinsDescriptor( new PinDescriptor(PinFormatHelper.ContainsComponents(mask.MinimumSwizzleInFormat), "Data to be swizzled.")); }
static CompareOperation() { PinDescriptor in1 = new PinDescriptor(ComparableFormat, "First operand of compare."); PinDescriptor in2 = new PinDescriptor(ComparableFormat, "Second operand of compare."); inputDesc = new PinsDescriptor( new PinEqual(in1, in2), in1, in2); }
/// <summary> /// Constructor /// </summary> static MultiplyOperation() { PinDescriptor src1 = new PinDescriptor(BinaryMathOperation.AllFormats, "Operand 1 (Left)"); PinDescriptor src2 = new PinDescriptor(BinaryMathOperation.AllFormats, "Operand 2 (Right)"); IPinRelation req = new PinMultipliable(src1, src2); inputDesc = new PinsDescriptor(req, src1, src2); }
/// <summary> /// Creates an expand operation. /// </summary> public ExpandOperation(PinFormat expandTo, ExpandType type) { this.type = type; this.expandTo = expandTo; inputDesc = new PinsDescriptor( new PinDescriptor(PinFormatHelper.ExpandableTo(expandTo), "Data to be expanded.")); }
static BranchOperation() { PinDescriptor b = new PinDescriptor(PinFormat.Bool, "Branch value."); PinDescriptor in1 = new PinDescriptor(AllFormats, "True branch value."); PinDescriptor in2 = new PinDescriptor(AllFormats, "False branch value."); inputDesc = new PinsDescriptor( new PinEqual(in1, in2), in1, in2); }
/// <summary> /// A static constructor. /// </summary> static BinaryMathOperation() { // Input descriptor. PinDescriptor in1 = new PinDescriptor(BinaryMathOperation.AllFormats, "Source 1"); PinDescriptor in2 = new PinDescriptor(BinaryMathOperation.AllFormats, "Source 2"); IPinRelation req = new PinEqual(in1, in2); InputDesc = new PinsDescriptor(req, in1, in2); }
/// <summary> /// A static constructor. /// </summary> static DotProductOperation() { // Input descriptor. PinDescriptor in1 = new PinDescriptor(DotProductOperation.InputFormats, "Source 1"); PinDescriptor in2 = new PinDescriptor(DotProductOperation.InputFormats, "Source 2"); IPinRelation req = new PinEqual(in1, in2); InputDesc = new PinsDescriptor(req, in1, in2); }
void UpdateDesc() { // We create output desc. List <PinDescriptor> descs = new List <PinDescriptor>(); foreach (KeyValuePair <PinComponent, Pin> pair in inputs) { descs.Add(new PinDescriptor(pair.Value.Format, string.Empty, pair.Key)); } inputDesc = new PinsDescriptor(descs.ToArray()); }
static LoadOperation() { PinDescriptor texture = new PinDescriptor(new PinFormat[] { PinFormat.Texture1D, PinFormat.BufferTexture, PinFormat.Texture1DArray, PinFormat.Texture2D, PinFormat.Texture2DArray, PinFormat.Texture3D }, "Texture"); PinDescriptor addr = new PinDescriptor(new PinFormat[] { PinFormat.Integerx2, PinFormat.Integerx3, PinFormat.Integerx4 }, "Address"); PinDescriptor offset = new PinDescriptor(new PinFormat[] { PinFormat.Integer, PinFormat.Integerx2, PinFormat.Integerx3 }, true, "Offset"); inputDesc = new PinsDescriptor(new IPinRelation[] { new PinTextureMipmappedAddressable(texture, addr), new PinTextureAddressable(texture, offset), }, texture, addr, offset); }
static SampleOperation() { PinDescriptor sampler = new PinDescriptor(PinFormat.Sampler, "Sampler"); PinDescriptor texture = new PinDescriptor(new PinFormat[] { PinFormat.Texture1D, PinFormat.BufferTexture, PinFormat.Texture1DArray, PinFormat.Texture2D, PinFormat.Texture2DArray, PinFormat.Texture3D }, "Texture"); PinDescriptor addr = new PinDescriptor(new PinFormat[] { PinFormat.Float, PinFormat.Floatx2, PinFormat.Floatx3 }, "Address"); PinDescriptor offset = new PinDescriptor(new PinFormat[] { PinFormat.Integer, PinFormat.Integerx2, PinFormat.Integerx3 }, true, "Offset"); inputDesc = new PinsDescriptor(new IPinRelation[] { new PinTextureAddressable(texture, addr), new PinTextureAddressable(texture, offset), }, sampler, texture, addr, offset); }