ComputeTextureColor Class
Namespace: Stride.Rendering.Materials.ComputeColorsAssembly: Stride.Rendering.dll
A color texture node.
[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() |
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. |
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 |
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
GetTextureChannelAsString()
protected override string GetTextureChannelAsString()
Returns
Type | Description |
---|---|
System.String |