Class ComputeTextureColor
- Namespace
- Stride.Rendering.Materials.ComputeColors
- Assembly
- Stride.Rendering.dll
A color texture node.
[DataContract("ComputeTextureColor")]
[Display("Texture", null)]
public class ComputeTextureColor : ComputeTextureBase, IComputeColor, IComputeNode
- Inheritance
-
ComputeTextureColor
- Implements
- Inherited Members
Constructors
ComputeTextureColor()
Constructor
public ComputeTextureColor()
ComputeTextureColor(Texture)
Initializes a new instance of the ComputeTextureColor class.
public ComputeTextureColor(Texture texture)
Parameters
texture
TextureThe 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
texture
TextureThe texture.
texcoordIndex
TextureCoordinateIndex of the texcoord.
scale
Vector2The scale.
offset
Vector2The offset.
Properties
FallbackValue
Gets or sets the default value used when no texture is set.
[DataMember(15)]
public ComputeColor FallbackValue { get; set; }
Property Value
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
Swizzle
Sets the channel swizzling for texture sampling.
public string Swizzle { get; set; }
Property Value
Methods
GenerateShaderFromFallbackValue(ShaderGeneratorContext, MaterialComputeColorKeys)
public override ShaderSource GenerateShaderFromFallbackValue(ShaderGeneratorContext context, MaterialComputeColorKeys baseKeys)
Parameters
context
ShaderGeneratorContextbaseKeys
MaterialComputeColorKeys
Returns
GetTextureChannelAsString()
protected override string GetTextureChannelAsString()