Inheritance: EventDispatcher → Node → InputNode → UniformNode →
This type of uniform node represents a 2D texture.
Constructs a new texture node.
value
The texture.
Default is EmptyTexture.
uvNode
The uv node.
Default is null.
levelNode
The level node.
Default is null.
biasNode
The bias node.
Default is null.
Represents the bias to be applied during level-of-detail computation.
Default is null.
Represents a reference value a texture sample is compared to.
Default is null.
When using texture arrays, the depth node defines the layer to select.
Default is null.
When defined, a texture is sampled using explicit gradients.
Default is null.
This flag can be used for type testing.
Default is true.
Represents the mip level that should be selected.
Default is null.
Represents the optional texel offset applied to the unnormalized texture coordinate before sampling the texture.
Default is null.
The reference node.
Default is null.
Whether texture values should be sampled or fetched.
Default is true.
Whether the uv transformation matrix should be automatically updated or not. Use setUpdateMatrix() if you want to change the value of the property.
Default is false.
By default the update() method is not executed. Depending on whether a uv transformation matrix and/or flipY is applied, update() is executed per object.
Default is 'none'.
Overrides: UniformNode#updateType
Represents the texture coordinates.
Default is null.
The texture value.
Overrides: UniformNode#value
Samples the texture with the given bias.
biasNode
The bias node.
Returns: A texture node representing the texture sample.
Samples a blurred version of the texture by defining an internal bias.
amountNode
How blurred the texture should be.
Returns: A texture node representing the texture sample.
Clones the texture node.
Returns: The cloned texture node.
Samples the texture by executing a compare operation.
compareNode
The node that defines the compare value.
Returns: A texture node representing the texture sample.
Samples the texture by defining a depth node.
depthNode
The depth node.
Returns: A texture node representing the texture sample.
Generates the code snippet of the texture node.
builder
The current node builder.
output
The current output.
Overrides: UniformNode#generate
Returns: The generated code snippet.
Generates the offset code snippet.
builder
The current node builder.
offsetNode
The offset node to generate code for.
Returns: The generated code snippet.
Generates the snippet for the texture sampling.
builder
The current node builder.
textureProperty
The texture property.
uvSnippet
The uv snippet.
levelSnippet
The level snippet.
biasSnippet
The bias snippet.
depthSnippet
The depth snippet.
compareSnippet
The compare snippet.
gradSnippet
The grad snippet.
offsetSnippet
The offset snippet.
Returns: The generated code snippet.
Generates the uv code snippet.
builder
The current node builder.
uvNode
The uv node to generate code for.
Returns: The generated code snippet.
Returns the base texture of this node.
Returns: The base texture node.
Returns a default uvs based on the current texture's channel.
Returns: The default uvs.
Overwrites the default implementation to return a fixed value 'texture'.
builder
The current node builder.
Overrides: UniformNode#getInputType
Returns: The input type.
Overwritten since the node type is inferred from the texture type.
builder
The current node builder.
Overrides: UniformNode#getNodeType
Returns: The node type.
Returns the sampler value.
Returns: The sampler value.
Transforms the given uv node with the texture transformation matrix.
uvNode
The uv node to transform.
Returns: The transformed uv node.
Overwritten since the uniform hash is defined by the texture's UUID.
builder
The current node builder.
Overrides: UniformNode#getUniformHash
Returns: The uniform hash.
Samples the texture using an explicit gradient.
gradNodeX
The gradX node.
gradNodeY
The gradY node.
Returns: A texture node representing the texture sample.
Samples a specific mip of the texture.
levelNode
The mip level to sample.
Returns: A texture node representing the texture sample.
TSL function for creating a texture node that fetches/loads texels without interpolation.
uvNode
The uv node.
Returns: A texture node representing the texture load.
Samples the texture by defining an offset node.
offsetNode
The offset node.
Returns: A texture node representing the texture sample.
Samples the texture with the given uv node.
uvNode
The uv node.
Returns: A texture node representing the texture sample.
Sets the sampler value.
value
The sampler value to set.
Returns: A reference to this texture node.
Defines whether the uv transformation matrix should automatically be updated or not.
value
The update toggle.
Returns: A reference to this node.
Setups texture node by preparing the internal nodes for code generation.
builder
The current node builder.
Overrides: UniformNode#setup
Setups the uv node. Depending on the backend as well as texture's image and type, it might be necessary to modify the uv node for correct sampling.
builder
The current node builder.
uvNode
The uv node to setup.
Returns: The updated uv node.
Returns the texture size of the requested level.
levelNode
The level to compute the size for.
Returns: The texture size.
The update is used to implement the update of the uv transformation matrix.
Overrides: UniformNode#update
Overwritten to always return the texture reference of the node.
state
This method can be invocated in different contexts so state can refer to any object type.
Overrides: UniformNode#updateReference
Returns: The texture reference.