Building a New Stingray Shader Using the ShaderFX Editor

You can build your physically based shader using the ShaderFX editor window and the available ShaderFX nodes.

To start, first create a Standard Base node from the ShaderFX right-click menu or the Node Browser.

To create a preset shader graph:

To edit your shader graph:

To create a float value in the shading network:

  1. Create an Input Material Variable node, then choose Scalar or Vector 3 or Vector 4 from the Type drop-down list on the Properties panel.
  2. Give the Material Variable node a meaningful name; for example, Blend.

    Naming your Stingray nodes makes it easier to find them on the Material Editor Parameters rollout.

  3. Wire the new node to an appropriate location in the shader graph.

    The Stingray Parameters rollout does not update until a new node is correctly wired.

  4. Minimize the ShaderFX editor. On the Stingray Parameters rollout, use the new control to set the value.

To create a color value in the shading network:

  1. Create an Input Material Variable node, then choose Vector 3 or Vector 4 from the Type drop-down list on the Properties panel.
    Note: You can connect any combinations of float1–4; that is, you can connect a float3 port to a float4 port, for instance.
  2. Give the Material Variable node a meaningful name; for example, DiffuseColor.

    Naming your Stingray nodes makes it easier to find them on the Material Editor Parameters rollout.

  3. Wire the new node to an appropriate location in the shader graph.

    The Stingray Parameters rollout does not update until a new node is correctly wired.

  4. Minimize the ShaderFX editor. On the Stingray Parameters rollout, use the new control to choose the color.

    In the ShaderFX editor, the node's preview swatch now shows the new color.

To create a texture map:

  1. To create a texture map, create a Sampling Sample Texture node.
  2. Give the Sample Texture node a meaningful name; for example, DiffuseMap.

    Naming your Stingray nodes makes it easier to find them on the Material Editor Parameters rollout.

  3. Create a UV node (for example, Vertex Inputs Texcoord0) and wire it to the UV input of the Sample Texture node.

    If you don't provide the Sample Texture node with coordinates, the ShaderFX editor flags an error when you try to wire the Sample Texture to another node's input.

  4. Wire the new Sample Texture node to an appropriate location in the shader graph.

    The Stingray Parameters rollout does not update until a new node is correctly wired.

  5. Minimize the ShaderFX editor. On the Stingray Parameters rollout, use the new control to choose the map.

In the ShaderFX editor, the node's preview swatch now shows the new texture map.