ComputeTextureScalar Class
Namespace: Stride.Rendering.Materials.ComputeColorsAssembly: Stride.Rendering.dll
A scalar texture node.
Derived from ComputeTextureScalar:
[DataContract("ComputeTextureScalar")]
[Display("Texture", null)]
public class ComputeTextureScalar : ComputeTextureBase, IComputeScalar, IComputeNode
| Name | Description | |
|---|---|---|
| Constructors | ||
| ComputeTextureScalar() | Constructor |
|
| ComputeTextureScalar(Texture, TextureCoordinate, Vector2, Vector2) | Initializes a new instance of the ComputeTextureColor class. |
|
| Properties | ||
| Channel | Gets or sets the channel. |
|
| FallbackValue | Gets or sets the default value used when no texture is set. |
|
| Methods | ||
| GenerateShaderFromFallbackValue(ShaderGeneratorContext, MaterialComputeColorKeys) | ||
| GetTextureChannelAsString() | ||
Constructors
ComputeTextureScalar()
Constructor
public ComputeTextureScalar()
ComputeTextureScalar(Texture, TextureCoordinate, Vector2, Vector2)
Initializes a new instance of the ComputeTextureColor class.
public ComputeTextureScalar(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
Channel
Gets or sets the channel.
[DataMember(20)]
public ColorChannel Channel { get; set; }
Property Value
| Type | Description |
|---|---|
| ColorChannel | The channel. |
FallbackValue
Gets or sets the default value used when no texture is set.
[DataMember(15)]
[DataMemberRange(0, 1, 0.01, 0.1, 3)]
public ComputeFloat FallbackValue { get; set; }
Property Value
| Type | Description |
|---|---|
| ComputeFloat |
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 |