Table of Contents

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 T

The left child.

rightChild T

The right child.

binaryOperator BinaryOperator

The 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

BinaryOperator

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 ShaderGeneratorContext
baseKeys MaterialComputeColorKeys

Returns

ShaderSource

ShaderSource.

GetChildren(object)

Gets the children.

public override IEnumerable<IComputeNode> GetChildren(object context = null)

Parameters

context object

The 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.