Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ComputeTextureBase Class

    Namespace: Stride.Rendering.Materials.ComputeColors
    Assembly: Stride.Rendering.dll

    Base class for texture nodes

    System.Object → ComputeNode → ComputeKeyedBase → ComputeTextureBase
    Derived from ComputeTextureBase: ComputeTextureColor ComputeTextureScalar

    [DataContract(Inherited = true)]
    [Display("Texture", null)]
    public abstract class ComputeTextureBase : ComputeKeyedBase, IComputeNode
    Name Description
    Constructors
    ComputeTextureBase(Texture, TextureCoordinate, Vector2, Vector2)

    Initializes a new instance of the ComputeTextureColor class.

    Properties
    AddressModeU

    The texture address mode.

    AddressModeV

    The texture address mode.

    Enabled

    Gets or sets the enable state of the texture.

    Filtering

    The texture filtering mode.

    Offset

    The offset in the texture coordinates.

    Scale

    The scale of the texture coordinates.

    TexcoordIndex

    The texture coordinate used to sample the texture.

    Texture

    The texture Reference.

    UseRandomTextureCoordinates

    Uses random texture coordinates.

    Methods
    GenerateShaderFromFallbackValue(ShaderGeneratorContext, MaterialComputeColorKeys)
    GenerateShaderSource(ShaderGeneratorContext, MaterialComputeColorKeys)
    GetTextureChannelAsString()
    ToString()
    | Improve this Doc View Source

    Constructors


    ComputeTextureBase(Texture, TextureCoordinate, Vector2, Vector2)

    Initializes a new instance of the ComputeTextureColor class.

    protected ComputeTextureBase(Texture texture, TextureCoordinate texcoordIndex, Vector2 scale, Vector2 offset)
    Parameters
    Type Name Description
    Texture texture

    The texture.

    TextureCoordinate texcoordIndex

    Index of the texcoord.

    Vector2 scale

    The scale.

    Vector2 offset

    The offset.

    | Improve this Doc View Source

    Properties


    AddressModeU

    The texture address mode.

    [DataMember(42)]
    [Display("Address mode U", null)]
    public TextureAddressMode AddressModeU { get; set; }
    Property Value
    Type Description
    TextureAddressMode

    AddressModeV

    The texture address mode.

    [DataMember(43)]
    [Display("Address mode V", null)]
    public TextureAddressMode AddressModeV { get; set; }
    Property Value
    Type Description
    TextureAddressMode

    Enabled

    Gets or sets the enable state of the texture.

    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    Filtering

    The texture filtering mode.

    [DataMember(41)]
    public TextureFilter Filtering { get; set; }
    Property Value
    Type Description
    TextureFilter

    Offset

    The offset in the texture coordinates.

    [DataMember(60)]
    public Vector2 Offset { get; set; }
    Property Value
    Type Description
    Vector2

    Scale

    The scale of the texture coordinates.

    [DataMember(50)]
    public Vector2 Scale { get; set; }
    Property Value
    Type Description
    Vector2

    TexcoordIndex

    The texture coordinate used to sample the texture.

    [DataMember(30)]
    public TextureCoordinate TexcoordIndex { get; set; }
    Property Value
    Type Description
    TextureCoordinate

    Texture

    The texture Reference.

    [DataMember(10)]
    [Display("Texture", null)]
    public Texture Texture { get; set; }
    Property Value
    Type Description
    Texture

    UseRandomTextureCoordinates

    Uses random texture coordinates.

    [DataMember(70)]
    [Display("Use random texture coordinates", null)]
    public bool UseRandomTextureCoordinates { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Methods


    GenerateShaderFromFallbackValue(ShaderGeneratorContext, MaterialComputeColorKeys)

    public abstract ShaderSource GenerateShaderFromFallbackValue(ShaderGeneratorContext context, MaterialComputeColorKeys baseKeys)
    Parameters
    Type Name Description
    ShaderGeneratorContext context
    MaterialComputeColorKeys baseKeys
    Returns
    Type Description
    ShaderSource

    GenerateShaderSource(ShaderGeneratorContext, MaterialComputeColorKeys)

    public override ShaderSource GenerateShaderSource(ShaderGeneratorContext context, MaterialComputeColorKeys baseKeys)
    Parameters
    Type Name Description
    ShaderGeneratorContext context
    MaterialComputeColorKeys baseKeys
    Returns
    Type Description
    ShaderSource
    Overrides
    ComputeNode.GenerateShaderSource(ShaderGeneratorContext, MaterialComputeColorKeys)

    GetTextureChannelAsString()

    protected abstract string GetTextureChannelAsString()
    Returns
    Type Description
    System.String

    ToString()

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

    Inherited Members

    ComputeKeyedBase.Key
    ComputeKeyedBase.UsedKey
    ComputeNode.GetChildren(Object)

    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