Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ComputeTextureScalar Class

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

    A scalar texture node.

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

    [DataContract("ComputeTextureScalar")]
    [Display("Texture", null)]
    public class ComputeTextureScalar : ComputeTextureBase, IComputeScalar, IComputeNode
    Name Description
    Constructors
    ComputeTextureScalar()

    Constructor

    ComputeTextureScalar(Texture, TextureCoordinate, Vector2, Vector2)

    Initializes a new instance of the ComputeTextureColor class.

    Properties
    Channel

    Gets or sets the channel.

    FallbackValue

    Gets or sets the default value used when no texture is set.

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

    Constructors


    ComputeTextureScalar()

    Constructor

    public ComputeTextureScalar()

    ComputeTextureScalar(Texture, TextureCoordinate, Vector2, Vector2)

    Initializes a new instance of the ComputeTextureColor class.

    public ComputeTextureScalar(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


    Channel

    Gets or sets the channel.

    [DataMember(20)]
    public ColorChannel Channel { get; set; }
    Property Value
    Type Description
    ColorChannel

    The channel.


    FallbackValue

    Gets or sets the default value used when no texture is set.

    [DataMember(15)]
    [DataMemberRange(0, 1, 0.01, 0.1, 3)]
    public ComputeFloat FallbackValue { get; set; }
    Property Value
    Type Description
    ComputeFloat
    | Improve this Doc View Source

    Methods


    GenerateShaderFromFallbackValue(ShaderGeneratorContext, MaterialComputeColorKeys)

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

    GetTextureChannelAsString()

    protected override string GetTextureChannelAsString()
    Returns
    Type Description
    System.String
    Overrides
    ComputeTextureBase.GetTextureChannelAsString()

    Inherited Members

    ComputeTextureBase.Enabled
    ComputeTextureBase.Texture
    ComputeTextureBase.TexcoordIndex
    ComputeTextureBase.Filtering
    ComputeTextureBase.AddressModeU
    ComputeTextureBase.AddressModeV
    ComputeTextureBase.Scale
    ComputeTextureBase.Offset
    ComputeTextureBase.UseRandomTextureCoordinates
    ComputeTextureBase.ToString()
    ComputeTextureBase.GenerateShaderSource(ShaderGeneratorContext, MaterialComputeColorKeys)
    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