Class ComputeTextureScalar
- Namespace
- Stride.Rendering.Materials.ComputeColors
- Assembly
- Stride.Rendering.dll
A scalar texture node.
[DataContract("ComputeTextureScalar")]
[Display("Texture", null)]
public class ComputeTextureScalar : ComputeTextureBase, IComputeScalar, IComputeNode
- Inheritance
-
ComputeTextureScalar
- Implements
- Inherited Members
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
texture
TextureThe texture.
texcoordIndex
TextureCoordinateIndex of the texcoord.
scale
Vector2The scale.
offset
Vector2The offset.
Properties
Channel
Gets or sets the channel.
[DataMember(20)]
public ColorChannel Channel { get; set; }
Property Value
- 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
Methods
GenerateShaderFromFallbackValue(ShaderGeneratorContext, MaterialComputeColorKeys)
public override ShaderSource GenerateShaderFromFallbackValue(ShaderGeneratorContext context, MaterialComputeColorKeys baseKeys)
Parameters
context
ShaderGeneratorContextbaseKeys
MaterialComputeColorKeys
Returns
GetTextureChannelAsString()
protected override string GetTextureChannelAsString()