ShaderMixinSource Class
Namespace: Stride.ShadersAssembly: Stride.Shaders.dll
A mixin performing a combination of ShaderClassCode and other mixins.
[DataContract("ShaderMixinSource")]
public sealed class ShaderMixinSource : ShaderSource, IEquatable<ShaderMixinSource>
Name | Description | |
---|---|---|
Constructors | ||
ShaderMixinSource() | Initializes a new instance of the ShaderMixinSource class. |
|
Properties | ||
Compositions | Gets or sets the compositions. |
|
Macros | Gets or sets the macros. |
|
Mixins | Gets or sets the mixins. |
|
Name | Gets or sets the name of the sdfx effect linked to this node. |
|
Parent | ||
Methods | ||
AddComposition(String, ShaderSource) | Adds a composition to this mixin. |
|
AddCompositionToArray(String, ShaderSource) | Adds a composition to this mixin. |
|
AddMacro(String, Object) | Adds a macro to this mixin. |
|
Clone() | ||
CloneFrom(ShaderMixinSource) | Clones from the specified ShaderMixinSource. |
|
DeepCloneFrom(ShaderMixinSource) | Clones from the specified ShaderMixinSource. Clones members too. |
|
Equals(ShaderMixinSource) | ||
Equals(Object) | ||
GetHashCode() | ||
ToString() |
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
Type | Description |
---|---|
SortedList<System.String, ShaderSource> | The compositions. |
Macros
Gets or sets the macros.
[DataMember(30)]
public List<ShaderMacro> Macros { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<ShaderMacro> | The macros. |
Mixins
Gets or sets the mixins.
[DataMember(10)]
public List<ShaderClassCode> Mixins { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.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
Type | Description |
---|---|
System.String | The name of the sdfx effect. |
Parent
public ShaderMixinSource Parent { get; set; }
Property Value
Type | Description |
---|---|
ShaderMixinSource |
Methods
AddComposition(String, ShaderSource)
Adds a composition to this mixin.
public void AddComposition(string name, ShaderSource shaderSource)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
ShaderSource | shaderSource | The shader source. |
AddCompositionToArray(String, ShaderSource)
Adds a composition to this mixin.
public int AddCompositionToArray(string name, ShaderSource shaderSourceElement)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
ShaderSource | shaderSourceElement | The shader source element. |
Returns
Type | Description |
---|---|
System.Int32 | 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
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.Object | value | The value. |
Clone()
public override object Clone()
Returns
Type | Description |
---|---|
System.Object |
Overrides
CloneFrom(ShaderMixinSource)
Clones from the specified ShaderMixinSource.
public void CloneFrom(ShaderMixinSource parent)
Parameters
Type | Name | Description |
---|---|---|
ShaderMixinSource | parent | The parent mixin to clone from. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | parent |
DeepCloneFrom(ShaderMixinSource)
Clones from the specified ShaderMixinSource. Clones members too.
public void DeepCloneFrom(ShaderMixinSource parent)
Parameters
Type | Name | Description |
---|---|---|
ShaderMixinSource | parent | The parent mixin to clone from. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | parent |
Equals(ShaderMixinSource)
public bool Equals(ShaderMixinSource other)
Parameters
Type | Name | Description |
---|---|---|
ShaderMixinSource | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
public override bool Equals(object against)
Parameters
Type | Name | Description |
---|---|---|
System.Object | against |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
ToString()
public override string ToString()
Returns
Type | Description |
---|---|
System.String |