Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ComputeColor Class

    Namespace: Stride.Rendering.Materials.ComputeColors
    Assembly: Stride.Rendering.dll
    System.Object → ComputeNode → ComputeKeyedBase → ComputeValueBase<Color4> → ComputeColor
    Derived from ComputeColor:

    [DataContract("ComputeColor")]
    [Display("Color", null)]
    public class ComputeColor : ComputeValueBase<Color4>, IComputeColor, IComputeNode
    Name Description
    Constructors
    ComputeColor()

    Initializes a new instance of the ComputeColor class.

    ComputeColor(Color4)

    Initializes a new instance of the ComputeColor class.

    Properties
    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.

    PremultiplyAlpha

    Gets or sets a value indicating whether to convert the texture in pre-multiplied alpha.

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

    Constructors


    ComputeColor()

    Initializes a new instance of the ComputeColor class.

    public ComputeColor()

    ComputeColor(Color4)

    Initializes a new instance of the ComputeColor class.

    public ComputeColor(Color4 value)
    Parameters
    Type Name Description
    Color4 value

    The value.

    | Improve this Doc View Source

    Properties


    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

    PremultiplyAlpha

    Gets or sets a value indicating whether to convert the texture in pre-multiplied alpha.

    [DataMember(10)]
    [Display("Premultiply alpha", null)]
    public bool PremultiplyAlpha { get; set; }
    Property Value
    Type Description
    System.Boolean

    true to convert the texture in pre-multiplied alpha.; otherwise, false.

    | Improve this Doc View Source

    Methods


    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)

    ToString()

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

    Inherited Members

    ComputeValueBase<Color4>.Value
    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