search
Start typing to search...

Shaders: Texture Modules

Author: Aximmetry

Introduction

This document describes the built-in Flow Graph modules of the following categories for shaders:

  • Shaders: Texture - Modules that sample, load, convert, copy, and query texture resources, normals, and sampler states in shader graphs.

Shaders: Texture

This section describes the built-in Flow Graph modules that sample, load, convert, copy, and query texture resources, normals, and sampler states in shader graphs.

Const Texture

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Provides a constant 2D texture resource.
  • Input pins:
    •   Image File (constant texture) - Texture asset used as the constant 2D texture.
  • Output pins:
    •   Out (texture) - 2D texture resource output.

Const Texture 3D

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Provides a constant 3D texture resource.
  • Input pins:
    •   Image File (constant volume texture) - 3D texture asset used as the constant resource.
  • Output pins:
    •   Out (volume texture) - 3D texture resource output.

Const Texture Array

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Provides a constant 2D texture-array resource.
  • Input pins:
    •   Image File (constant texture array) - Texture-array asset used as the constant resource.
  • Output pins:
    •   Out (texture array) - 2D texture-array resource output.

Const Texture Cube

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Provides a constant cubemap texture resource.
  • Input pins:
    •   Image File (constant cube texture) - Cubemap asset used as the constant resource.
  • Output pins:
    •   Out (cube texture) - Cubemap texture resource output.

Copy Texture

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Passes the input texture value to the output without change.
  • Input pins:
    •   In (texture) - The source value
    •   Tunnel (config string) - Tunnel name used to receive the input texture.
  • Output pins:
    •   Out (texture) - The unchanged texture value.

Copy Texture 3D

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Passes the input 3D texture value to the output without change.
  • Input pins:
    •   In (volume texture) - The source value
    •   Tunnel (config string) - Tunnel name used to receive the input 3D texture.
  • Output pins:
    •   Out (volume texture) - The unchanged 3D texture value.

Copy Texture Array

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Passes the input texture array value to the output without change.
  • Input pins:
    •   In (texture array) - The source value
    •   Tunnel (config string) - Tunnel name used to receive the input texture array.
  • Output pins:
    •   Out (texture array) - The unchanged texture array value.

Copy Texture Cube

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Passes the input cubemap texture value to the output without change.
  • Input pins:
    •   In (cube texture) - The source value
    •   Tunnel (config string) - Tunnel name used to receive the input cubemap texture.
  • Output pins:
    •   Out (cube texture) - The unchanged cubemap texture value.

Displace

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Offsets world position along the surface normal using a texture-derived displacement value.
  • Input pins:
    •   Texture Value (scalar) - Sampled displacement value used to compute the offset amount.
    •   Scale (scalar) - Overall strength of the displacement offset.
    •   Center (scalar) - Reference value treated as zero displacement.
    •   World Position (vector) - Current world position to displace.
    •   World Velocity (vector) - World-space motion used to reconstruct previous position.
    •   World Normal (vector) - Current world normal used for displacement direction.
    •   World Normal Veloc (vector) - Change in world normal used for previous-frame reconstruction.
    •   Aux Data (vector) - Auxiliary data where W controls displacement sign handling.
  • Output pins:
    •   World Position (vector) - Displaced world position for the current frame.
    •   Prev World Position (vector) - Displaced world position reconstructed for the previous frame.

Load

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Loads one texel from a 2D texture by integer coordinates.
  • Input pins:
    •   Texture (texture) - 2D texture to load from.
    •   X (unsigned integer) - Horizontal texel coordinate.
    •   Y (unsigned integer) - Vertical texel coordinate.
    •   Level (unsigned integer) - Mip level to load from.
    •   Unpremultiply (logical) - When on, converts loaded premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Loaded color channels.
    •   Opacity (scalar) - Loaded opacity channel.

Load 3D

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Loads one texel from a 3D texture by integer coordinates.
  • Input pins:
    •   Texture (volume texture) - 3D texture to load from.
    •   X (unsigned integer) - Horizontal texel coordinate.
    •   Y (unsigned integer) - Vertical texel coordinate.
    •   Z (unsigned integer) - Depth texel coordinate.
    •   Level (unsigned integer) - Mip level to load from.
    •   Unpremultiply (logical) - When on, converts loaded premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Loaded color channels.
    •   Opacity (scalar) - Loaded opacity channel.

Normal Perturb

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Perturbs the world normal using a sampled normal map.
  • Input pins:
    •   World Position (vector) - World position used to derive view-dependent tangent frame.
    •   World Normal (vector) - Base world normal to perturb.
    •   Normal Map (texture) - Normal-map texture sampled for perturbation.
    •   Tex Coords (vector) - Texture coordinates used to sample NormalMap.
    •   Calc Norm Z (logical) - When on, reconstructs Z from X and Y for the sampled normal.
    •   Sampler State (sampler state) - Sampler state used for normal-map lookup.
  • Output pins:
    •   World Normal (vector) - Perturbed world normal result.

Sample

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a 2D texture and outputs color and opacity.
  • Input pins:
    •   Texture (texture) - 2D texture to sample.
    •   Tex Coords (vector) - Texture coordinates used for sampling.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sample 3D

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a 3D texture and outputs color and opacity.
  • Input pins:
    •   Texture (volume texture) - 3D texture to sample.
    •   Tex Coords (vector) - 3D texture coordinates used for sampling.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sample 3D Level

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a 3D texture at an explicit mip level.
  • Input pins:
    •   Texture (volume texture) - 3D texture to sample.
    •   Tex Coords (vector) - 3D texture coordinates used for sampling.
    •   Level (scalar) - Explicit mip level used for sampling.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sample Array

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a 2D texture array layer and outputs color and opacity.
  • Input pins:
    •   Texture (texture array) - 2D texture array to sample.
    •   Tex Coords (vector) - Texture coordinates used for sampling.
    •   Index (scalar) - Array element index to sample.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sample Array Level

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a 2D texture array layer at an explicit mip level.
  • Input pins:
    •   Texture (texture array) - 2D texture array to sample.
    •   Tex Coords (vector) - Texture coordinates used for sampling.
    •   Index (scalar) - Array element index to sample.
    •   Level (scalar) - Explicit mip level used for sampling.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sample Bicubic

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a 2D texture with bicubic filtering.
  • Input pins:
    •   Texture (texture) - 2D texture to sample.
    •   Tex Coords (vector) - Texture coordinates used for sampling.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
    •   For Additive (logical) - When on, uses bicubic sampling behavior tuned for additive content.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sample Cube

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a cubemap texture using a direction vector.
  • Input pins:
    •   Texture (cube texture) - Cubemap texture to sample.
    •   Direction (vector) - Direction vector used for cubemap lookup.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sample Cube Level

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a cubemap texture at an explicit mip level.
  • Input pins:
    •   Texture (cube texture) - Cubemap texture to sample.
    •   Direction (vector) - Direction vector used for cubemap lookup.
    •   Level (scalar) - Explicit mip level used for sampling.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sample Level

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a 2D texture at an explicit mip level and outputs color and opacity.
  • Input pins:
    •   Texture (texture) - 2D texture to sample.
    •   Tex Coords (vector) - Texture coordinates used for sampling.
    •   Level (scalar) - Explicit mip level used for sampling.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sample Long Lat

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a 2D longitude-latitude environment map from a direction vector.
  • Input pins:
    •   Texture (texture) - 2D longitude-latitude texture to sample.
    •   Direction (vector) - Direction vector converted to longitude-latitude coordinates.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sample Sphere

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a 2D spherical environment map from a direction vector.
  • Input pins:
    •   Texture (texture) - 2D spherical map texture to sample.
    •   Direction (vector) - Direction vector converted to spherical texture coordinates.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sample SS

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Samples a 2D texture using supersampling.
  • Input pins:
    •   Texture (texture) - 2D texture to sample.
    •   Tex Coords (vector) - Texture coordinates used for sampling.
    •   Sampler State (sampler state) - Sampler state used for texture lookup.
    •   Unpremultiply (logical) - When on, converts sampled premultiplied color to straight color.
  • Output pins:
    •   Color (color) - Sampled color channels.
    •   Opacity (scalar) - Sampled opacity channel.

Sampler State

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Builds a sampler state for texture sampling modules.
  • Input pins:
    •   Filter (integer, Filter) - Selects the filtering mode.
    •   Address U (integer, Texture Address Mode) - Addressing mode along the U axis.
    •   Address V (integer, Texture Address Mode) - Addressing mode along the V axis.
    •   Address W (integer, Texture Address Mode) - Addressing mode along the W axis.
    •   Mip LOD Bias (scalar) - Bias added to mip level selection.
    •   Max Anisotropy (integer) - Maximum anisotropy used by anisotropic filters.
    •   Comparison Func (integer, Comparison) - Comparison function used by comparison samplers.
    •   Border Color (vector) - Border color used when an address mode selects border sampling.
    •   Min LOD (scalar) - Minimum mip level allowed for sampling.
    •   Max LOD (scalar) - Maximum mip level allowed for sampling.
  • Output pins:
    •   Out (sampler state) - Configured sampler state object.

Tex To Normal

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Decodes a texture normal and transforms it into the target space.
  • Input pins:
    •   Color (color) - Texture color sample containing encoded normal data.
    •   Transformation (transformation) - Transform applied to the decoded normal vector.
    •   Calc Norm Z (logical) - When on, reconstructs Z from X and Y to produce a unit normal.
  • Output pins:
    •   Out (vector) - Normalized transformed normal vector.

Tex To Tangent

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Builds a tangent direction from texture normal data and orients it in the target space.
  • Input pins:
    •   Color (color) - Texture color sample containing encoded tangent-plane direction.
    •   Transformation (transformation) - Transform applied to the decoded tangent direction.
    •   Mod Normal (vector) - Reference normal used to orthogonalize the tangent result.
  • Output pins:
    •   Out (vector) - Normalized tangent direction vector.

Tex To Vector

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Converts a texture color sample from packed normal-map space to a vector value.
  • Input pins:
    •   Color (color) - Texture color sample to decode.
    •   Calc Norm Z (logical) - When on, reconstructs Z from X and Y to produce a unit normal.
  • Output pins:
    •   Out (vector) - Decoded vector result.

Texture 3D Dim

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Outputs dimensions, depth, and mip-count information of a 3D texture.
  • Input pins:
    •   Texture (volume texture) - 3D texture to query.
    •   Level (integer) - Mip level used for width, height, and depth query.
  • Output pins:
    •   Width (integer) - Texture width at the selected mip level.
    •   Height (integer) - Texture height at the selected mip level.
    •   Depth (integer) - Texture depth at the selected mip level.
    •   Levels (integer) - Total number of mip levels in the texture.

Texture Array Dim

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Outputs dimensions, element count, and mip-count information of a 2D texture array.
  • Input pins:
    •   Texture (texture array) - 2D texture array to query.
    •   Level (integer) - Mip level used for width and height query.
  • Output pins:
    •   Width (integer) - Texture width at the selected mip level.
    •   Height (integer) - Texture height at the selected mip level.
    •   Elements (integer) - Number of array elements.
    •   Levels (integer) - Total number of mip levels in the texture array.

Texture Cube Dim

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Outputs size and mip-count information of a cubemap texture.
  • Input pins:
    •   Texture (cube texture) - Cubemap texture to query.
    •   Level (integer) - Mip level used for size query.
  • Output pins:
    •   Width (integer) - Cubemap face width at the selected mip level.
    •   Levels (integer) - Total number of mip levels in the cubemap.

Texture Dim

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Outputs dimensions and mip-count information of a 2D texture.
  • Input pins:
    •   Texture (texture) - 2D texture to query.
    •   Level (integer) - Mip level used for width and height query.
  • Output pins:
    •   Width (integer) - Texture width at the selected mip level.
    •   Height (integer) - Texture height at the selected mip level.
    •   Levels (integer) - Total number of mip levels in the texture.

Vector To Tex

  • Category: Shaders: Texture
  • Access: All editions.
  • Function: Encodes a vector value into texture color space.
  • Input pins:
    •   Vector (vector) - Vector value to encode into color channels.
  • Output pins:
    •   Out (color) - Encoded texture color value.
Article Content

Loading
Close
Loading spinner icon
1/10