Table of Contents

Class ShaderMixinSource

Namespace
Stride.Shaders
Assembly
Stride.Shaders.dll

A mixin performing a combination of ShaderClassCode and other mixins.

[DataContract("ShaderMixinSource")]
public sealed class ShaderMixinSource : ShaderSource, IEquatable<ShaderMixinSource>
Inheritance
ShaderMixinSource
Implements
Inherited Members

Constructors

ShaderMixinSource()

Initializes a new instance of the ShaderMixinSource class.

public ShaderMixinSource()

Properties

Compositions

Gets or sets the compositions.

[DataMember(20)]
public SortedList<string, ShaderSource> Compositions { get; set; }

Property Value

SortedList<string, ShaderSource>

The compositions.

Macros

Gets or sets the macros.

[DataMember(30)]
public List<ShaderMacro> Macros { get; set; }

Property Value

List<ShaderMacro>

The macros.

Mixins

Gets or sets the mixins.

[DataMember(10)]
public List<ShaderClassCode> Mixins { get; set; }

Property Value

List<ShaderClassCode>

The mixins.

Name

Gets or sets the name of the sdfx effect linked to this node.

[DataMember(0)]
public string Name { get; set; }

Property Value

string

The name of the sdfx effect.

Parent

public ShaderMixinSource Parent { get; set; }

Property Value

ShaderMixinSource

Methods

AddComposition(string, ShaderSource)

Adds a composition to this mixin.

public void AddComposition(string name, ShaderSource shaderSource)

Parameters

name string

The name.

shaderSource ShaderSource

The shader source.

AddCompositionToArray(string, ShaderSource)

Adds a composition to this mixin.

public int AddCompositionToArray(string name, ShaderSource shaderSourceElement)

Parameters

name string

The name.

shaderSourceElement ShaderSource

The shader source element.

Returns

int

Returns the index of the composition in the array.

AddMacro(string, object)

Adds a macro to this mixin.

public void AddMacro(string name, object value)

Parameters

name string

The name.

value object

The value.

Clone()

Deep clones this instance.

public override object Clone()

Returns

object

A new instance.

CloneFrom(ShaderMixinSource)

Clones from the specified ShaderMixinSource.

public void CloneFrom(ShaderMixinSource parent)

Parameters

parent ShaderMixinSource

The parent mixin to clone from.

Exceptions

ArgumentNullException

parent

DeepCloneFrom(ShaderMixinSource)

Clones from the specified ShaderMixinSource. Clones members too.

public void DeepCloneFrom(ShaderMixinSource parent)

Parameters

parent ShaderMixinSource

The parent mixin to clone from.

Exceptions

ArgumentNullException

parent

Equals(ShaderMixinSource)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ShaderMixinSource other)

Parameters

other ShaderMixinSource

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to this instance.

public override bool Equals(object against)

Parameters

against object

The object to compare with this instance.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.