Class ComputeBinaryBase<T>
- Namespace
- Stride.Rendering.Materials.ComputeColors
- Assembly
- Stride.Rendering.dll
A node that describe a binary operation between two IComputeNode
[DataContract(Inherited = true)]
[Display("Binary Operator", null)]
public abstract class ComputeBinaryBase<T> : ComputeNode, IComputeNode where T : class, IComputeNode
Type Parameters
T
- Inheritance
-
ComputeBinaryBase<T>
- Implements
- Derived
Constructors
ComputeBinaryBase()
Initializes a new instance of the ComputeBinaryBase<T> class.
protected ComputeBinaryBase()
ComputeBinaryBase(T, T, BinaryOperator)
Initializes a new instance of the ComputeBinaryBase<T> class.
protected ComputeBinaryBase(T leftChild, T rightChild, BinaryOperator binaryOperator)
Parameters
leftChild
TThe left child.
rightChild
TThe right child.
binaryOperator
BinaryOperatorThe material binary operand.
Properties
LeftChild
The left (background) child node.
[DataMember(20)]
[Display("Left", null)]
public T LeftChild { get; set; }
Property Value
- T
Operator
The operation to blend the nodes.
[DataMember(10)]
public BinaryOperator Operator { get; set; }
Property Value
RightChild
The right (foreground) child node.
[DataMember(30)]
[Display("Right", null)]
public T RightChild { get; set; }
Property Value
- T
Methods
GenerateShaderSource(ShaderGeneratorContext, MaterialComputeColorKeys)
Generates the shader source equivalent for this node
public override ShaderSource GenerateShaderSource(ShaderGeneratorContext context, MaterialComputeColorKeys baseKeys)
Parameters
context
ShaderGeneratorContextbaseKeys
MaterialComputeColorKeys
Returns
- ShaderSource
ShaderSource.
GetChildren(object)
Gets the children.
public override IEnumerable<IComputeNode> GetChildren(object context = null)
Parameters
context
objectThe context to get the children.
Returns
- IEnumerable<IComputeNode>
The list of children.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.