Output category - Stingray Shader Node Reference

Output category

Description

The nodes in this category are the endpoints of material shader graphs, which produce the final color value to use for the pixel being shaded.

Each shader graph must have one and only one of the nodes in this category.

Nodes

Inputs

vector3

Base Color

An RGB color or texture to project.

scalar

Base Color Opacity

Determines the opacity of the RGB base color when blended on top of other intersecting meshes. 0 is fully transparent, 1 is fully opaque.

Default value: 1.0

vector3

Normal

A normal map to project, to alter the apparent surface detail of the intersecting meshes.

scalar

Normal Opacity

Determines the strength of the normal map when blended on top of other intersecting meshes. 0 makes the normal map have no apparent effect on the surfaces, 1 makes the normals affect the surface at full strength.

Default value: 1.0

scalar

Normal Threshold

This value allows you to selectively apply the decal to intersecting meshes based on their surface normals. When the difference between the normal of the surface and the orientation of the decal projector is below this threshold, the decal is not applied.

vector3

Emissive

An RGB color that will be emitted from the surfaces being projected upon.

scalar

Mask

A scalar value that works in conjunction with the Mask Threshold to determine whether the decal should be shown.

Note that the the strength or opacity of the decal is controlled by the Base Color Opacity and Normal Opacity values. The mask controls only the visibility of the decal.

scalar

Mask Threshold

When the value of the Mask input is below this threshold, the decal is not applied.

Default value: 0.5

Options
Normals In

Specifies whether the normals provided to the Normal input are expressed in tangent space or world space.

Tangent Basis From

Specifies the frame of reference for input normals when the Normals In option is set to use tangent space.

  • Decal box applies normals relative to the orientation of the decal projector. This is useful for things like bulletholes, where the direction of projection should affect the way the surface is raised or lowered.
  • Surface applies normals relative to the surface being projected upon. This is useful for texturing that relates to the qualities of the surface more than the direction of the projection, such as projecting a bricks-and-mortar pattern on to a wall.
Instancing

Enabling this option may increase rendering performance in cases where you have many instances of the same mesh geometry using this material in your scene.

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/output_nodes/decal_base.shader_node

Inputs

vector3

Light Color

The color of the light that the dynamic light source using this material should emit.

For example, you could use a custom light material to make your light shine a color pattern, or to animate the properties of the emitted light at runtime.

Node definition in file: core/stingray_renderer/output_nodes/light_base.shader_node

Inputs

vector2

Size

An optional size parameter that can be used to control the size of a billboard. Typically the user will feed the value from the node Particles / Billboard Size. Input value is in meters. Default value: 1.0

vector2

Pivot Point

An optional pivot point used to adjust the rotation origin of a billboard.

scalar

Rotation

An optional rotation parameter that can be used to control the rotation of a billboard. Typically the user will feed the value from the node Particles / Billboard Rotation. Input value is an angle in radians. Default value: 0.0

vector3

Base Color

For a non-metallic surface this becomes the albedo RGB of the surface, for metallic surfaces this becomes the specular RGB. Input value is an RGB color in linear color space.

scalar

Opacity

An optional opacity of the pixel being shaded. Values closer to 0 are more transparent; values closer to 1 are more opaque. Note that this value is used differently depending on the value of the Blend Mode option.

Default value: 0.5.

scalar

Opacity Threshold

When the Blend Mode option is set to Opaque (G-buffer), and a value is set for the Opacity input, this value sets the threshold at which the surface becomes visible. When the opacity input value is below this threshold, the mesh is not shaded (fully transparent). When the opacity input value is above this threshold, the mesh is fully opaque.

Default value: 0.5.

vector3

Normal

A directional vector perpendicular to the surface being shaded. Use this input to apply a normal map that contains small-scale details in the relief of the surface. Note that this vector should either be in tangent space or world space depending on the value of Normals In

scalar

Metallic

Setting this to 1.0 makes the pixel reflect light as a conductor, or metallic surface. Setting this to 0.0 makes the pixel reflect light as a dielectric, like plastic. Anything in between blends between a dielectric and conductor. Note: This value affects how Base Color is interpreted.

Default value: 0

scalar

Roughness

The amount of roughness on the surface. Values closer to 0 produce a more glossy finish; values closer to 1 produce a more matte finish.

Default value: 0.5

vector3

Emissive

An optional RGB color of light that the surface being shaded should emit into the scene. Input value is an RGB color in linear color space.

scalar

Ambient Occlusion

A scalar value that applies a faint shadowing effect, typically based on the presence of other nearby objects. Values closer to 0 produce stronger shadowing; values closer to 1 produce less shadowing.

Default value: 1

scalar

Density

For surfaces with Matarial Type set to Translucent, this value determines how much the surface scatters incoming light. Values closer to 0 produce more scatter and let through more light; values closer to 1 minimizes the light scatter.

Default value: 1

Options
Material Type

Determines what type of material is rendered for this material.

Blend Mode

Determines how input opacity values are applied to the surface.

  • Opaque (G-buffer): Every pixel on the surface is either fully opaque or fully transparent (not rendered).
  • Transparent: Opacity values between 0 and 1 result in a partially transparent surface. Specular is additively blended on top.
  • Transparent Fade: As the Transparent option, but also reduces the specular color of the surface in proportion to the input opacity.
  • Transparent Add: Same as Transparent, but then the color gets added to the object rendered behind it
  • Transparent Fade Add: Same as Transparent Fade but then the color gets added to the object rendered behind it
Transparent Lighting

Determines how lighting is calculated when Blend Mode is set to anything else than Opaque (G-buffer).

  • Unlit: No lighting is calculated, value passed to Base Color will be the value that gets blended into the lighting buffer based on Blend Mode (default)
  • Per-pixel (Diffuse): Diffuse lighting (no specular) is calculated per pixel.
  • Per-pixel (Diffuse & Specular): Diffuse and Specular lighting is calculated per pixel.
Normals In

Specifies the frame of reference for the normals passed in to the Normals input: whether they are expressed in world space or in the tangent space of the surface being shaded.

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

You use this output node for materials that will be assigned to a particle effects billboard visualizer.

Node definition in file: core/stingray_renderer/output_nodes/particle_base.shader_node

Since it has no inputs or options, there is typically no reason to use this node directly in a custom material that you create.

Node definition in file: core/stingray_renderer/output_nodes/probe_base.shader_node

Inputs

vector3

Position Offset

An optional world-space offset to apply to the position of the pixel being shaded, changing the apparent placement of the object in the scene.

vector3

Last Position Offset

An optional last frame world-space offset to supply if a user is using the Position Offset option to be able to calculate velocities to accuratly do temporal based effects without artifacts.

vector3

Base Color

The RGB color of the pixel being shaded.

scalar

Opacity

The opacity of the pixel being shaded. Values closer to 0 are more transparent; values closer to 1 are more opaque. Note that this value is used differently depending on the value of the Blend Mode option.

Default value: 0.5.

scalar

Opacity Threshold

When the Blend Mode option is set to Opaque, and a value is set for the Opacity input, this value sets the threshold at which the mesh becomes visible. When the opacity input value is below this threshold, the mesh is not shaded (fully transparent). When the opacity input value is above this threshold, the mesh is fully opaque.

Regardless of the Blend Mode setting, whenever there is both an emissive color and an opacity value set, this value sets the opacity threshold at which the emissive effect becomes visible.

Default value: 0.5.

vector3

Normal

A directional vector perpendicular to the surface being shaded. Use this input to apply a normal map that contains small-scale details in the relief of the surface.

scalar

Metallic

The "shininess" and reflectivity of the surface. Values closer to 0 produce a duller surface; values closer to 1 produce a shinier and more reflective surface.

Default value: 0

scalar

Roughness

The amount of fine roughness on the surface. Values closer to 0 produce a more glossy finish; values closer to 1 produce a more matte finish.

Default value: 0.5

scalar

Tessellation Factor

Optional parameter to control the tessellation factor used when the hardware tessellation option in the node properties is enabled. A lower value will result in a less tessellated mesh. Make sure that you also set the Hardware Tesselation option in the node properties.

Note: For the constant tessellation option, this value drives the constant tessellation of the surface. To implement adaptive tessellation, you can make your graph compute the input value based on the distance to the camera (the length of the eye vector).

If you intend to get your tesselation factor input values from a texture, use the **Sampling > Domain Sample Texture** node to sample the texture.

Default value: 0.001 Min value: 0.001 Max value: 16

scalar, vector3

World Displacement

The distance to displace the tesselated vertices in meters. This value can be either a scalar value for height-based displacement or a vector3 value for vector based displacement.

If you intend to get your displacement input values from a texture, use the **Sampling > Domain Sample Texture** node to sample the texture.

vector3

Emissive

An optional color of light that the surface being shaded should emit into the scene.

scalar

Ambient Occlusion

A scalar value that applies a faint shadowing effect, typically based on the presence of other nearby objects. Values closer to 0 produce stronger shadowing; values closer to 1 produce less shadowing.

Default value: 1

scalar

Refraction

For partially transparent surfaces, this value defines the refractivity of the material: how much it bends the light that passes through it. Values closer to 0 bend the light more strongly; values closer to 1 produces less deflection.

Default value: 1

scalar

Density

For partially transparent surfaces, this value determines how much the mesh scatters incoming light. Values closer to 0 produce more scatter and more of a glowing effect; values closer to 1 minimize the scatter.

Default value: 1

scalar

Clear Coat Roughness

When the material type is "Clear Coat" this input allows you to control the roughness of the top clear coat layer

Default value: 0

scalar

Cloth Falloff

Options
Material Type

Determines what type of material is rendered for this material.

Normals In

Specifies the frame of reference for the normals passed in to the Normals input: whether they are expressed in world space or in the tangent space of the surface being shaded.

Blend Mode

Determines how input opacity values are applied to the surface.

  • Opaque: Every pixel on the surface is either fully opaque or fully transparent (not rendered).
  • Transparent: Opacity values between 0 and 1 result in a partially transparent surface.
  • Transparent Fade: As the Transparent option, but also reduces the specular color of the surface in proportion to the input opacity.
  • Transparent add: Same as transparency, but then the color gets added to the object rendered behind it
Face Culling

Determines whether any overlapping triangles in the mesh are culled (not rendered). You can cull only triangles in the back, only triangles in the front, or neither. For solid surfaces, you will typically want to cull triangles in the back in order to avoid the overhead of rendering faces that will be hidden by the front faces. For semi-transparent surfaces, you may want to disable culling in order for the back side of the object to be visible through the front faces.

Shadows Casting

Determines how shadow casting behaves when rendering the material into shadow maps.

  • Default: If Blend Mode is Opaque, Transparent or Transparent Fade the shadow will become opaque unless something is connected to Opacity whereas it switches over to be alpha clipped.
  • Opaque: Force shadows to always render as opaque.
  • Alpha Clip: Force shadows to always render as alpha clipped (requires that something is connected to the Opacity input)
  • Off: Disables shadow casting
Instancing

Enabling this option may increase rendering performance in cases where you have many instances of the same mesh geometry using this material in your scene.

Hardware Tessellation
  • Constant: Will enable constant hardware tessellation. The constant tessellation will tessellate the mesh across the full surface using the value provided to the Tessellation Factor input.
    • Off: Will disable hardware tessellation
NOTE: To set the options listed above, select this node in the shader graph and open the Property Editor panel in the Stingray Editor.

You will typically use this output node for most common materials that you create for use in Stingray.

Node definition in file: core/stingray_renderer/output_nodes/standard_base.shader_node

Inputs

vector3

Base Color

The base RGB color of the terrain's surface.

vector3

Normal

The normal vector of the surface: i.e. the basis vector of tangent space that is perpendicular to the surface.

scalar

Metallic

The "shininess" and reflectivity of the surface. Values closer to 0 produce a duller surface; values closer to 1 produce a shinier and more reflective surface.

scalar

Roughness

The amount of fine roughness on the surface. Values closer to 0 produce a more glossy finish; values closer to 1 produce a more matte finish.

scalar

Ambient Occlusion

The amount of ambient occlusion to apply to the pixel being shaded.

Options
Normals In

Specifies the frame of reference for the normals passed in to the Normals input: whether they are expressed in world space or in the tangent space of the surface being shaded.

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/output_nodes/terrain_base.shader_node

Inputs

vector3

Position Offset

An optional offset to apply to the position of the pixel being shaded, in world space.

vector3

Base Color

The RGB color of the pixel being shaded.

scalar

Opacity

The opacity of the pixel being shaded. Values closer to 0 are more transparent; values closer to 1 are more opaque. Note that the Blend Mode option must be set to Transparent in order for this value to be used.

Options
Layer

Determines which shading pass the object is rendered with.

Depth Testing

Determines how the mesh being shaded is placed in line with other meshes in front of it, intersecting it, and behind it.

  • Normal: The mesh occludes meshes that are behind it and that intersect it, and the mesh is occluded by other meshes that are between it and the camera.
  • Disabled: Causes the mesh being shaded to be rendered in front of all other meshes between it and the camera.
Blend Mode
Face Culling

Determines whether any overlapping triangles in the mesh are culled (not rendered). You can cull only triangles in the back, only triangles in the front, or neither. For solid surfaces, you will typically want to cull triangles in the back in order to avoid the overhead of rendering faces that will be hidden by the front faces. For semi-transparent surfaces, you may want to disable culling in order for the back side of the object to be visible through the front faces.

Depth Test Enabled

When enabled the resulting pixel operation will only occur if its z position is closer to the camera than the existing pixel at that location

Diffuse Map

Set this for diffuse images that are not videos or fonts

Median Bit Alpha

Set this for distance field fonts

Edge Anti-aliased
Font Map

Set this for font maps that are not videos or images

YUV Video

Set this for videos that are not images or fonts

Disable Depth Writes
Instancing

Enabling this option may increase rendering performance in cases where you have many instances of the same mesh geometry using this material in your scene.

Camera Translation Lock

When enabled, the world space position of the mesh being shaded is offset by the position of the camera. As the camera moves, the mesh appears to move with it, remaining at a static translation relative to the camera.

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/output_nodes/ui_base.shader_node

Inputs

vector3

Position Offset

An optional offset to apply to the position of the pixel being shaded, in world space.

vector3

Base Color

The RGB color of the pixel being shaded.

scalar

Opacity

The opacity of the pixel being shaded. Values closer to 0 are more transparent; values closer to 1 are more opaque. Note that the Blend Mode option must be set to Transparent in order for this value to be used.

Options
Layer

Determines which shading pass the object is rendered with.

Depth Testing

Determines how the mesh being shaded is placed in line with other meshes in front of it, intersecting it, and behind it.

  • Normal: The mesh occludes meshes that are behind it and that intersect it, and the mesh is occluded by other meshes that are between it and the camera.
  • Inverted: Causes the shader to apply only to the surfaces of other meshes that intersect it or that are between it and the camera.
  • Disabled: Causes the mesh being shaded to be rendered in front of all other meshes between it and the camera.
Blend Mode

Determines how input opacity values are applied to the surface.

  • Opaque: Every pixel on the surface is fully opaque. The opacity input value is not used.
  • Transparent: Opacity values between 0 and 1 result in a partially transparent surface.
Face Culling

Determines whether any overlapping triangles in the mesh are culled (not rendered). You can cull only triangles in the back, only triangles in the front, or neither. For solid surfaces, you will typically want to cull triangles in the back in order to avoid the overhead of rendering faces that will be hidden by the front faces. For semi-transparent surfaces, you may want to disable culling in order for the back side of the object to be visible through the front faces.

Disable Depth Writes

Determines whether or not the pixels in the object being shaded are written into the depth buffer. You may need to enable this if your material is semi-transparent and you are having problems with it covering up other semi-transparent materials.

Instancing

Enabling this option may increase rendering performance in cases where you have many instances of the same mesh geometry using this material in your scene.

Project to Far Plane

When enabled, the mesh being shaded is rendered behind all other rendered meshes. It will only be visible in places where it does not occlude any other meshes that lie in between the camera and its far clipping plane.

Camera Translation Lock

When enabled, the world space position of the mesh being shaded is offset by the position of the camera. As the camera moves, the mesh appears to move with it, remaining at a static translation relative to the camera.

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

An unlit material has only a base color and an optional opacity. Because it is unaffected by light, it does not receive or cast shadows. It does not offer any of the physically based surface properties of the Stingray standard base output like metallic and roughness settings, and cannot accept a normal map.

You can use unlit materials as an inexpensive way to shade objects that you do not need to be realistically shaded as a part of the scene.

Node definition in file: core/stingray_renderer/output_nodes/unlit_base.shader_node