Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    ShaderMixinSource Class

    Namespace: Stride.Shaders
    Assembly: Stride.Shaders.dll

    A mixin performing a combination of ShaderClassCode and other mixins.

    System.Object → ShaderSource → ShaderMixinSource
    Derived from ShaderMixinSource:

    [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()
    | Improve this Doc View Source

    Constructors


    ShaderMixinSource()

    Initializes a new instance of the ShaderMixinSource class.

    public ShaderMixinSource()
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    ShaderSource.Clone()

    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
    ShaderSource.Equals(Object)

    GetHashCode()

    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    ShaderSource.GetHashCode()

    ToString()

    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Inherited Members

    ShaderSource.Discard

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation