Sampling category - Stingray Shader Node Reference

Sampling category

Description

The nodes in this category read the color value stored in a texture resource at specified UV coordinates.

Nodes

Inputs

vector2

UV

The UV coordinates to sample.

scalar

Mip Level

Specifies which mipmap level to read from the texture. When omitted, this value is set to the highest mip level (0).

Outputs

Out

vector4

A linear RGBA value that represents the color value stored in the texture at the specified UV coordinates; or, for normal maps, the normal vector expressed in tangent space.

Options
Encoding

Specifies the way the color values in the supplied texture are encoded.

  • Linear Color: The texture colors are recorded in linear space.
  • sRGB Color: The texture colors are recorded using standard RGB values.
  • Normal Map: The texture is a normal map.
  • RGBM Color: The texture colors use RGBM encoding. See this page for details.
Address mode

Determines how the sampler treats UV coordinate values that are outside the normal [0..1] range.

  • Clamp: UV coordinate values above 1 are treated as 1, and values below 0 are treated as 0. This mode typically results in the sampled texture being applied to the mesh in one place, with the pixels on the edges of the texture being stretched across the rest of the mesh.
  • Wrap: UV coordinate values above 1 and below -1 have their integer parts discarded and only their fractional parts used. This typically results in the sampled texture being tiled or wrapped across the surface. This also allows you to place a Math > Multiply node before the sample node in order to force the input texture to tile multiple times.
Filter mode

Determines the process used in order to calculate a single final output color value for the pixel being shaded from the pixels in the texture being sampled.

  • Anisotropic: The best quality filtering method, recommended for most cases.
  • Point: Computes the pixel in the texture that most closely matches the coordinates of the pixel being shaded, and returns its color. A fast and efficient method, but likely to cause chunky, jagged or blurred results.
  • Linear: As the Point method, but also blends in the colors of the neighboring texture pixels above, below, and to the sides.
Invert Green Channel

Determines whether or not the sampler inverts the color values of the green channel. Use this setting when you are sampling from a normal map, and the map appears inverted. That is, if areas that should be raised above the surface appear inset into the surface and vice-versa.

NOTE: To set the options listed above, select this node in the shader graph and open the Property Editor panel in the Stingray Editor.

When you select this node in the shader graph, you can use the following options in the Property Editor to configure the properties that can be used to control its value.

Display Name

The name that will be shown for this texture slot in the Property Editor and in the Story Editor.

Slot Name

The internal name for this texture slot. No spaces allowed. Use this name when you want to change the texture being sampled through Flow or Lua.

UIOrder

Determines the order of this texture slot's input widget within the list of input variables and sample textures shown in the Property Editor. Variables with lower numbers show up toward the top of the Property Editor; variables with higher numbers show up lower down.

Node definition in file: core/shader_nodes/domain_sample_texture.shader_node

Inputs

vector3

UVW

The UVW coordinates to sample.

scalar

Mip Level

Specifies which mipmap level to read from the texture. When omitted, this value is determined internally based on the apparent size of the mesh being shaded.

Outputs

Out

vector4

A linear RGBA value that represents the color value stored in the texture at the specified UVW coordinates; or, for normal maps, the normal vector expressed in tangent space.

Options
Encoding

Specifies the way the color values in the supplied texture are encoded.

  • Linear Color: The texture colors are recorded in linear space.
  • sRGB Color: The texture colors are recorded using standard RGB values.
  • Normal Map: The texture is a normal map.
  • RGBM Color: The texture colors use RGBM encoding. See this page for details.
Address mode

Determines how the sampler treats UV coordinate values that are outside the normal [0..1] range.

  • Clamp: UV coordinate values above 1 are treated as 1, and values below 0 are treated as 0. This mode typically results in the sampled texture being applied to the mesh in one place, with the pixels on the edges of the texture being stretched across the rest of the mesh.
  • Wrap: UV coordinate values above 1 and below -1 have their integer parts discarded and only their fractional parts used. This typically results in the sampled texture being tiled or wrapped across the surface. This also allows you to place a Math > Multiply node before the sample node in order to force the input texture to tile multiple times.
Filter mode

Determines the process used in order to calculate a single final output color value for the pixel being shaded from the pixels in the texture being sampled.

  • Anisotropic: The best quality filtering method, recommended for most cases.
  • Point: Computes the pixel in the texture that most closely matches the coordinates of the pixel being shaded, and returns its color. A fast and efficient method, but likely to cause chunky, jagged or blurred results.
  • Linear: As the Point method, but also blends in the colors of the neighboring texture pixels above, below, and to the sides.
NOTE: To set the options listed above, select this node in the shader graph and open the Property Editor panel in the Stingray Editor.

Node definition in file: core/shader_nodes/sample_cube.shader_node

Inputs

vector2

UV

The UV coordinates to sample.

scalar

Mip Level

Specifies which mipmap level to read from the texture. When omitted, this value is determined internally based on the apparent size of the mesh being shaded.

Outputs

Out

vector4

A linear RGBA value that represents the color value stored in the skydome at the specified UV coordinates.

Options
Encoding

Specifies the way the color values in the skydome texture are encoded.

  • Linear Color: The texture colors are recorded in linear space.
  • sRGB Color: The texture colors are recorded using standard RGB values.
  • RGBM Color: The texture colors use RGBM encoding. See this page for details.
Address mode

Determines how the sampler treats UV coordinate values that are outside the normal [0..1] range.

  • Clamp: UV coordinate values above 1 are treated as 1, and values below 0 are treated as 0. This mode typically results in the sampled texture being applied to the mesh in one place, with the pixels on the edges of the texture being stretched across the rest of the mesh.
  • Wrap: UV coordinate values above 1 and below -1 have their integer parts discarded and only their fractional parts used. This typically results in the sampled texture being tiled or wrapped across the surface. This also allows you to place a Math > Multiply node before the sample node in order to force the input texture to tile multiple times.
Filter mode

Determines the process used in order to calculate a single final output color value for the pixel being shaded from the pixels in the texture being sampled.

  • Anisotropic: The best quality filtering method, recommended for most cases.
  • Point: Computes the pixel in the texture that most closely matches the coordinates of the pixel being shaded, and returns its color. A fast and efficient method, but likely to cause chunky, jagged or blurred results.
  • Linear: As the Point method, but also blends in the colors of the neighboring texture pixels above, below, and to the sides.
NOTE: To set the options listed above, select this node in the shader graph and open the Property Editor panel in the Stingray Editor.

Node definition in file: core/stingray_renderer/shader_nodes/sample_skydome.shader_node

Inputs

vector2

UV

The UV coordinates to sample.

scalar

Mip Level

Specifies which mipmap level to read from the texture. When omitted, this value is determined internally based on the apparent size of the mesh being shaded.

Outputs

Out

vector4

A linear RGBA value that represents the color value stored in the texture at the specified UV coordinates; or, for normal maps, the normal vector expressed in tangent space.

Options
Encoding

Specifies the way the color values in the supplied texture are encoded.

  • Linear Color: The texture colors are recorded in linear space.
  • sRGB Color: The texture colors are recorded using standard RGB values.
  • Normal Map: The texture is a normal map.
  • RGBM Color: The texture colors use RGBM encoding. See this page for details.
Address mode

Determines how the sampler treats UV coordinate values that are outside the normal [0..1] range.

  • Clamp: UV coordinate values above 1 are treated as 1, and values below 0 are treated as 0. This mode typically results in the sampled texture being applied to the mesh in one place, with the pixels on the edges of the texture being stretched across the rest of the mesh.
  • Wrap: UV coordinate values above 1 and below -1 have their integer parts discarded and only their fractional parts used. This typically results in the sampled texture being tiled or wrapped across the surface. This also allows you to place a Math > Multiply node before the sample node in order to force the input texture to tile multiple times.
Filter mode

Determines the process used in order to calculate a single final output color value for the pixel being shaded from the pixels in the texture being sampled.

  • Anisotropic: The best quality filtering method, recommended for most cases.
  • Point: Computes the pixel in the texture that most closely matches the coordinates of the pixel being shaded, and returns its color. A fast and efficient method, but likely to cause chunky, jagged or blurred results.
  • Linear: As the Point method, but also blends in the colors of the neighboring texture pixels above, below, and to the sides.
Invert Green Channel

Determines whether or not the sampler inverts the color values of the green channel. Use this setting when you are sampling from a normal map, and the map appears inverted. That is, if areas that should be raised above the surface appear inset into the surface and vice-versa.

NOTE: To set the options listed above, select this node in the shader graph and open the Property Editor panel in the Stingray Editor.

When you select this node in the shader graph, you can use the following options in the Property Editor to configure the properties that can be used to control its value.

Display Name

The name that will be shown for this texture slot in the Property Editor and in the Story Editor.

Slot Name

The internal name for this texture slot. No spaces allowed. Use this name when you want to change the texture being sampled through Flow or Lua.

UIOrder

Determines the order of this texture slot's input widget within the list of input variables and sample textures shown in the Property Editor. Variables with lower numbers show up toward the top of the Property Editor; variables with higher numbers show up lower down.

Node definition in file: core/shader_nodes/sample_texture.shader_node

Inputs

vector2

UV

The UV coordinates to sample.

scalar

Mip Level

Specifies which mipmap level to read from the texture. When omitted, this value is set to the highest mip level (0).

Outputs

Out

vector4

A linear RGBA value that represents the color value stored in the texture at the specified UV coordinates; or, for normal maps, the normal vector expressed in tangent space.

Options
Encoding

Specifies the way the color values in the supplied texture are encoded.

  • Linear Color: The texture colors are recorded in linear space.
  • sRGB Color: The texture colors are recorded using standard RGB values.
  • Normal Map: The texture is a normal map.
  • RGBM Color: The texture colors use RGBM encoding. See this page for details.
Address mode

Determines how the sampler treats UV coordinate values that are outside the normal [0..1] range.

  • Clamp: UV coordinate values above 1 are treated as 1, and values below 0 are treated as 0. This mode typically results in the sampled texture being applied to the mesh in one place, with the pixels on the edges of the texture being stretched across the rest of the mesh.
  • Wrap: UV coordinate values above 1 and below -1 have their integer parts discarded and only their fractional parts used. This typically results in the sampled texture being tiled or wrapped across the surface. This also allows you to place a Math > Multiply node before the sample node in order to force the input texture to tile multiple times.
Filter mode

Determines the process used in order to calculate a single final output color value for the pixel being shaded from the pixels in the texture being sampled.

  • Anisotropic: The best quality filtering method, recommended for most cases.
  • Point: Computes the pixel in the texture that most closely matches the coordinates of the pixel being shaded, and returns its color. A fast and efficient method, but likely to cause chunky, jagged or blurred results.
  • Linear: As the Point method, but also blends in the colors of the neighboring texture pixels above, below, and to the sides.
Invert Green Channel

Determines whether or not the sampler inverts the color values of the green channel. Use this setting when you are sampling from a normal map, and the map appears inverted. That is, if areas that should be raised above the surface appear inset into the surface and vice-versa.

NOTE: To set the options listed above, select this node in the shader graph and open the Property Editor panel in the Stingray Editor.

When you select this node in the shader graph, you can use the following options in the Property Editor to configure the properties that can be used to control its value.

Display Name

The name that will be shown for this texture slot in the Property Editor and in the Story Editor.

Slot Name

The internal name for this texture slot. No spaces allowed. Use this name when you want to change the texture being sampled through Flow or Lua.

UIOrder

Determines the order of this texture slot's input widget within the list of input variables and sample textures shown in the Property Editor. Variables with lower numbers show up toward the top of the Property Editor; variables with higher numbers show up lower down.

Node definition in file: core/shader_nodes/vertex_sample_texture.shader_node