Table of Contents

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 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

texture Texture

The texture.

texcoordIndex TextureCoordinate

Index of the texcoord.

scale Vector2

The scale.

offset Vector2

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

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

bool

Swizzle

Sets the channel swizzling for texture sampling.

public string Swizzle { get; set; }

Property Value

string

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