Class ComputeColor
- Namespace
- Stride.Rendering.Materials.ComputeColors
- Assembly
- Stride.Rendering.dll
[DataContract("ComputeColor")]
[Display("Color", null)]
public class ComputeColor : ComputeValueBase<Color4>, IComputeColor, IComputeNode
- Inheritance
-
ComputeColor
- Implements
- Inherited Members
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
value
Color4The value.
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
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
- bool
true
to convert the texture in pre-multiplied alpha.; otherwise,false
.
Methods
GenerateShaderSource(ShaderGeneratorContext, MaterialComputeColorKeys)
Generates the shader source equivalent for this node
public override ShaderSource GenerateShaderSource(ShaderGeneratorContext context, MaterialComputeColorKeys baseKeys)
Parameters
context
ShaderGeneratorContextbaseKeys
MaterialComputeColorKeys
Returns
- ShaderSource
ShaderSource.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.