Table of Contents

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 Texture

The texture.

texcoordIndex TextureCoordinate

Index of the texcoord.

scale Vector2

The scale.

offset Vector2

The 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

ComputeFloat

Methods

GenerateShaderFromFallbackValue(ShaderGeneratorContext, MaterialComputeColorKeys)

public override ShaderSource GenerateShaderFromFallbackValue(ShaderGeneratorContext context, MaterialComputeColorKeys baseKeys)

Parameters

context ShaderGeneratorContext
baseKeys MaterialComputeColorKeys

Returns

ShaderSource

GetTextureChannelAsString()

protected override string GetTextureChannelAsString()

Returns

string