Table of Contents

Class ComputeTextureBase

Namespace
Stride.Rendering.Materials.ComputeColors
Assembly
Stride.Rendering.dll

Base class for texture nodes

[DataContract(Inherited = true)]
[Display("Texture", null)]
public abstract class ComputeTextureBase : ComputeKeyedBase, IComputeNode
Inheritance
ComputeTextureBase
Implements
Derived
Inherited Members

Constructors

ComputeTextureBase(Texture, TextureCoordinate, Vector2, Vector2)

Initializes a new instance of the ComputeTextureColor class.

protected ComputeTextureBase(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

AddressModeU

The texture address mode.

[DataMember(42)]
[Display("Address mode U", null)]
public TextureAddressMode AddressModeU { get; set; }

Property Value

TextureAddressMode

AddressModeV

The texture address mode.

[DataMember(43)]
[Display("Address mode V", null)]
public TextureAddressMode AddressModeV { get; set; }

Property Value

TextureAddressMode

Enabled

Gets or sets the enable state of the texture.

public bool Enabled { get; set; }

Property Value

bool

Filtering

The texture filtering mode.

[DataMember(41)]
public TextureFilter Filtering { get; set; }

Property Value

TextureFilter

Offset

The offset in the texture coordinates.

[DataMember(60)]
public Vector2 Offset { get; set; }

Property Value

Vector2

Scale

The scale of the texture coordinates.

[DataMember(50)]
public Vector2 Scale { get; set; }

Property Value

Vector2

TexcoordIndex

The texture coordinate used to sample the texture.

[DataMember(30)]
public TextureCoordinate TexcoordIndex { get; set; }

Property Value

TextureCoordinate

Texture

The texture Reference.

[DataMember(10)]
[Display("Texture", null)]
public Texture Texture { get; set; }

Property Value

Texture

UseRandomTextureCoordinates

Uses random texture coordinates.

[DataMember(70)]
[Display("Use random texture coordinates", null)]
public bool UseRandomTextureCoordinates { get; set; }

Property Value

bool

Methods

GenerateShaderFromFallbackValue(ShaderGeneratorContext, MaterialComputeColorKeys)

public abstract ShaderSource GenerateShaderFromFallbackValue(ShaderGeneratorContext context, MaterialComputeColorKeys baseKeys)

Parameters

context ShaderGeneratorContext
baseKeys MaterialComputeColorKeys

Returns

ShaderSource

GenerateShaderSource(ShaderGeneratorContext, MaterialComputeColorKeys)

Generates the shader source equivalent for this node

public override ShaderSource GenerateShaderSource(ShaderGeneratorContext context, MaterialComputeColorKeys baseKeys)

Parameters

context ShaderGeneratorContext
baseKeys MaterialComputeColorKeys

Returns

ShaderSource

ShaderSource.

GetTextureChannelAsString()

protected abstract string GetTextureChannelAsString()

Returns

string

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.