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
TextureThe texture.
texcoordIndex
TextureCoordinateIndex of the texcoord.
scale
Vector2The scale.
offset
Vector2The offset.
Properties
AddressModeU
The texture address mode.
[DataMember(42)]
[Display("Address mode U", null)]
public TextureAddressMode AddressModeU { get; set; }
Property Value
AddressModeV
The texture address mode.
[DataMember(43)]
[Display("Address mode V", null)]
public TextureAddressMode AddressModeV { get; set; }
Property Value
Enabled
Gets or sets the enable state of the texture.
public bool Enabled { get; set; }
Property Value
Filtering
The texture filtering mode.
[DataMember(41)]
public TextureFilter Filtering { get; set; }
Property Value
Offset
The offset in the texture coordinates.
[DataMember(60)]
public Vector2 Offset { get; set; }
Property Value
Scale
The scale of the texture coordinates.
[DataMember(50)]
public Vector2 Scale { get; set; }
Property Value
TexcoordIndex
The texture coordinate used to sample the texture.
[DataMember(30)]
public TextureCoordinate TexcoordIndex { get; set; }
Property Value
Texture
The texture Reference.
[DataMember(10)]
[Display("Texture", null)]
public Texture Texture { get; set; }
Property Value
UseRandomTextureCoordinates
Uses random texture coordinates.
[DataMember(70)]
[Display("Use random texture coordinates", null)]
public bool UseRandomTextureCoordinates { get; set; }
Property Value
Methods
GenerateShaderFromFallbackValue(ShaderGeneratorContext, MaterialComputeColorKeys)
public abstract ShaderSource GenerateShaderFromFallbackValue(ShaderGeneratorContext context, MaterialComputeColorKeys baseKeys)
Parameters
context
ShaderGeneratorContextbaseKeys
MaterialComputeColorKeys
Returns
GenerateShaderSource(ShaderGeneratorContext, MaterialComputeColorKeys)
Generates the shader source equivalent for this node
public override ShaderSource GenerateShaderSource(ShaderGeneratorContext context, MaterialComputeColorKeys baseKeys)
Parameters
context
ShaderGeneratorContextbaseKeys
MaterialComputeColorKeys
Returns
- ShaderSource
ShaderSource.
GetTextureChannelAsString()
protected abstract string GetTextureChannelAsString()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.