Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ComputeTextureColor Class

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

    A color texture node.

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

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

    Constructor

    ComputeTextureColor(Texture)

    Initializes a new instance of the ComputeTextureColor class.

    ComputeTextureColor(Texture, TextureCoordinate, Vector2, Vector2)

    Initializes a new instance of the ComputeTextureColor class.

    Properties
    FallbackValue

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

    HasChanged

    Indicates if the IComputeColor has changed since the last time it was checked, which might require recompilation of the shader mixins. Once polled, it will reset all cached states and revert to false until other changes have been triggered.

    Swizzle

    Sets the channel swizzling for texture sampling.

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

    Constructors


    ComputeTextureColor()

    Constructor

    public ComputeTextureColor()

    ComputeTextureColor(Texture)

    Initializes a new instance of the ComputeTextureColor class.

    public ComputeTextureColor(Texture texture)
    Parameters
    Type Name Description
    Texture texture

    The texture.


    ComputeTextureColor(Texture, TextureCoordinate, Vector2, Vector2)

    Initializes a new instance of the ComputeTextureColor class.

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


    FallbackValue

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

    [DataMember(15)]
    public ComputeColor FallbackValue { get; set; }
    Property Value
    Type Description
    ComputeColor

    HasChanged

    Indicates if the IComputeColor has changed since the last time it was checked, which might require recompilation of the shader mixins. Once polled, it will reset all cached states and revert to false until other changes have been triggered.

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

    Swizzle

    Sets the channel swizzling for texture sampling.

    public string Swizzle { get; set; }
    Property Value
    Type Description
    System.String
    | 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