search
Start typing to search...

Shaders: Input-Output Modules

Author: Aximmetry

Introduction

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

  • Shaders: Input-Output - Modules that provide and build shader stage inputs, outputs, per-instance attributes, clipping, and render-state objects.

Shaders: Input-Output

This section describes the built-in Flow Graph modules that provide and build shader stage inputs, outputs, per-instance attributes, clipping, and render-state objects.

Blend State

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Builds a blend-state object for shader output configuration.
  • Input pins:
    •   Alpha To Coverage Enable (logical) - When on, enables alpha-to-coverage for multisampled targets.
    •   Blend Enable 0 (logical) - When on, enables blending on render target 0.
    •   Src Blend 0 (integer, Blend) - Source color blend factor for render target 0.
    •   Dest Blend 0 (integer, Blend) - Destination color blend factor for render target 0.
    •   Blend Op 0 (integer, Blend Op) - Color blend operation for render target 0.
    •   Src Blend Alpha 0 (integer, Blend) - Source alpha blend factor for render target 0.
    •   Dest Blend Alpha 0 (integer, Blend) - Destination alpha blend factor for render target 0.
    •   Blend Op Alpha 0 (integer, Blend Op) - Alpha blend operation for render target 0.
    •   Render Target Write Mask 0 (unsigned integer) - Channel write mask for render target 0.
    •   Blend Factor (vector) - Constant blend factor value used by blend modes that reference it.
    •   Sample Mask (unsigned integer) - Sample mask applied during blending and output writes.
  • Output pins:
    •   Out (blend state) - Configured blend state object.

Clip

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Discards the current shading sample when the input value is negative.
  • Input pins:
    •   In (vector) - Value tested by clipping; negative values discard the sample.
  • Output pins:

Clip Plane

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Discards the current shading sample based on a world-space clipping plane test.
  • Input pins:
    •   Position (vector) - World position tested against the clipping plane.
    •   Plane (vector) - Plane coefficients used for clipping in the form X, Y, Z, and W.
  • Output pins:

Depth Stencil State

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Builds a depth-stencil-state object for shader output configuration.
  • Input pins:
    •   Depth Enable (logical) - When on, enables depth testing.
    •   Depth Write Mask (integer, Depth Write Mask) - Selects whether depth writes are disabled or enabled.
    •   Depth Func (integer, Comparison) - Comparison function used by depth testing.
    •   Stencil Enable (logical) - When on, enables stencil testing.
    •   Stencil Read Mask (unsigned integer) - Bit mask applied when reading stencil values.
    •   Stencil Write Mask (unsigned integer) - Bit mask applied when writing stencil values.
    •   Front Face Stencil Fail (integer, Stencil Op) - Stencil operation when front-face stencil test fails.
    •   Front Face Stencil Depth Fail (integer, Stencil Op) - Stencil operation when front-face stencil passes but depth test fails.
    •   Front Face Stencil Pass (integer, Stencil Op) - Stencil operation when both front-face stencil and depth tests pass.
    •   Front Face Stencil Func (integer, Comparison) - Stencil comparison function for front faces.
    •   Back Face Stencil Fail (integer, Stencil Op) - Stencil operation when back-face stencil test fails.
    •   Back Face Stencil Depth Fail (integer, Stencil Op) - Stencil operation when back-face stencil passes but depth test fails.
    •   Back Face Stencil Pass (integer, Stencil Op) - Stencil operation when both back-face stencil and depth tests pass.
    •   Back Face Stencil Func (integer, Comparison) - Stencil comparison function for back faces.
    •   Stencil Ref (integer) - Stencil reference value used by stencil comparisons.
  • Output pins:
    •   Out (depth stencil state) - Configured depth-stencil state object.

Instanced Color RGB

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Passes the per-instance RGB color attribute to the shader graph.
  • Input pins:
    •   In (color) - Per-instance color value.
  • Output pins:
    •   Out (color) - Per-instance color value.

Instanced Scalar

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Passes the per-instance scalar attribute to the shader graph.
  • Input pins:
    •   In (scalar) - The source value
  • Output pins:
    •   Out (scalar) - Per-instance scalar value.

Instanced Vector XY

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Passes the per-instance XY attribute as a vector value.
  • Input pins:
    •   In (vector2) - The source value
  • Output pins:
    •   Out (vector) - Per-instance XY value expanded with Z and W set to 0.

Instanced Vector XYZ

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Passes the per-instance XYZ attribute as a vector value.
  • Input pins:
    •   In (vector3) - The source value
  • Output pins:
    •   Out (vector) - Per-instance XYZ value expanded with W set to 0.

Instanced Vector XYZW

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Passes the per-instance XYZW attribute to the shader graph.
  • Input pins:
    •   In (vector) - The source value
  • Output pins:
    •   Out (vector) - Per-instance vector value.

Material Domain Input

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Provides interpolated material attributes and tessellation factors for the domain stage.
  • Input pins:
    •   Interpolation Type (integer, Tessel Interpolation Type) - Selects flat or Phong interpolation for the blended world position.
    •   Shape Factor (scalar) - Blend amount toward Phong-projected position when InterpolationType is Phong.
  • Output pins:
    •   World Position (vector) - Interpolated world position for the generated domain point.
    •   World Normal (vector) - Normalized interpolated world normal.
    •   World Tangent (vector) - Normalized interpolated world tangent.
    •   World Binormal (vector) - Normalized interpolated world binormal.
    •   Tex Coords 1 (vector) - First UV pair from the interpolated texture coordinates.
    •   Tex Coords 2 (vector) - Second UV pair from the interpolated texture coordinates.
    •   Color (color) - Interpolated vertex color.
    •   Opacity (scalar) - Interpolated vertex opacity.
    •   General 1 (vector) - Interpolated custom payload 1.
    •   General 2 (vector) - Interpolated custom payload 2.
    •   General 3 (vector) - Interpolated custom payload 3.
    •   General 4 (vector) - Interpolated custom payload 4.
    •   Edge Tess Factor (scalar) - Edge tessellation factor from hull output edge 1.
    •   Inside Tess Factor (scalar) - Inside tessellation factor from hull output.

Material Domain Output

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Builds the domain-stage material vertex payload from the supplied inputs.
  • Input pins:
    •   Proj Position (vector) - Projected position written to the domain-stage output.
    •   Not Jittered Proj Position (vector) - Non-jittered projected position used for velocity-aware passes.
    •   Prev Not Jittered Proj Position (vector) - Previous-frame non-jittered projected position for velocity-aware passes.
    •   World Position (vector) - World position written to the output payload.
    •   World Normal (vector) - World normal written to the output payload.
    •   World Tangent (vector) - World tangent written to the output payload.
    •   World Binormal (vector) - World binormal written to the output payload.
    •   Tex Coords 1 (vector) - First UV pair written into texture coordinates.
    •   Tex Coords 2 (vector) - Second UV pair written into texture coordinates.
    •   Color (color) - Color channels of the output vertex color.
    •   Opacity (scalar) - Opacity channel of the output vertex color.
    •   General 1 (vector) - Custom payload 1 written to output.
    •   General 2 (vector) - Custom payload 2 written to output.
    •   General 3 (vector) - Custom payload 3 written to output.
    •   General 4 (vector) - Custom payload 4 written to output.
  • Output pins:

Material Geometry Input

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Reads one selected geometry-stage input vertex and exposes its material attributes.
  • Input pins:
    •   Vertex Index (integer) - Selects which incoming triangle vertex to read (1 to 3).
  • Output pins:
    •   Proj Position (vector) - Projected position of the selected vertex.
    •   Not Jittered Proj Position (vector) - Non-jittered projected position of the selected vertex when available.
    •   Prev Not Jittered Proj Position (vector) - Previous-frame non-jittered projected position of the selected vertex when available.
    •   World Position (vector) - World position of the selected vertex.
    •   World Normal (vector) - World normal of the selected vertex.
    •   World Tangent (vector) - World tangent of the selected vertex.
    •   World Binormal (vector) - World binormal of the selected vertex.
    •   Tex Coords 1 (vector) - First UV pair of the selected vertex.
    •   Tex Coords 2 (vector) - Second UV pair of the selected vertex.
    •   Color (color) - Color channels of the selected vertex color.
    •   Opacity (scalar) - Opacity channel of the selected vertex color.
    •   General 1 (vector) - Custom payload 1 of the selected vertex.
    •   General 2 (vector) - Custom payload 2 of the selected vertex.
    •   General 3 (vector) - Custom payload 3 of the selected vertex.
    •   General 4 (vector) - Custom payload 4 of the selected vertex.

Material Geometry Output

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Appends one geometry-stage output vertex with material attributes and optional strip restart.
  • Input pins:
    •   Order Index (integer) - Controls output order metadata for appended vertices.
    •   Restart Strip (logical) - When on, restarts the triangle strip before appending this vertex.
    •   Proj Position (vector) - Projected position written to the appended vertex.
    •   Not Jittered Proj Position (vector) - Non-jittered projected position for velocity-aware passes.
    •   Prev Not Jittered Proj Position (vector) - Previous-frame non-jittered projected position for velocity-aware passes.
    •   World Position (vector) - World position written to the appended vertex.
    •   World Normal (vector) - World normal written to the appended vertex.
    •   World Tangent (vector) - World tangent written to the appended vertex.
    •   World Binormal (vector) - World binormal written to the appended vertex.
    •   Tex Coords 1 (vector) - First UV pair written to texture coordinates.
    •   Tex Coords 2 (vector) - Second UV pair written to texture coordinates.
    •   Color (color) - Color channels of the appended vertex color.
    •   Opacity (scalar) - Opacity channel of the appended vertex color.
    •   General 1 (vector) - Custom payload 1 written to output.
    •   General 2 (vector) - Custom payload 2 written to output.
    •   General 3 (vector) - Custom payload 3 written to output.
    •   General 4 (vector) - Custom payload 4 written to output.
  • Output pins:

Material Hull Input

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Exposes per-patch data for hull-stage tessellation setup.
  • Input pins:
  • Output pins:
    •   Primitive ID (unsigned integer) - Primitive identifier of the current input patch.
    •   Screen Tex Coords 1 (vector) - Screen-space UV of patch vertex 1.
    •   Screen Tex Coords 2 (vector) - Screen-space UV of patch vertex 2.
    •   Screen Tex Coords 3 (vector) - Screen-space UV of patch vertex 3.
    •   World Position 1 (vector) - World position of patch vertex 1.
    •   World Position 2 (vector) - World position of patch vertex 2.
    •   World Position 3 (vector) - World position of patch vertex 3.
    •   World Normal 1 (vector) - World normal of patch vertex 1.
    •   World Normal 2 (vector) - World normal of patch vertex 2.
    •   World Normal 3 (vector) - World normal of patch vertex 3.

Material Hull Output

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Sets edge and inside tessellation factors for the current hull patch.
  • Input pins:
    •   Edge 1 Tess Factor (scalar) - Tessellation factor for edge 1 of the patch.
    •   Edge 2 Tess Factor (scalar) - Tessellation factor for edge 2 of the patch.
    •   Edge 3 Tess Factor (scalar) - Tessellation factor for edge 3 of the patch.
    •   Inside Tess Factor (scalar) - Inside tessellation factor of the patch.
  • Output pins:

Material Pixel Input

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Provides interpolated material data and screen-space context for pixel shading.
  • Input pins:
  • Output pins:
    •   Proj Position (vector) - Projected position of the current pixel sample.
    •   Screen Tex Coords (vector) - Screen-space UV derived from projected position.
    •   Screen Velocity (vector) - Screen-space motion vector from previous to current position when velocity is enabled.
    •   World Position (vector) - World position at the current sample.
    •   World Normal (vector) - Normalized world normal at the current sample.
    •   Tangent To World (transformation) - Tangent-to-world transform built from tangent, binormal, and normal.
    •   Tex Coords 1 (vector) - First UV pair from interpolated texture coordinates.
    •   Tex Coords 2 (vector) - Second UV pair from interpolated texture coordinates.
    •   Color (color) - Interpolated vertex color.
    •   Opacity (scalar) - Interpolated vertex opacity.
    •   General 1 (vector) - Interpolated custom payload 1.
    •   General 2 (vector) - Interpolated custom payload 2.
    •   General 3 (vector) - Interpolated custom payload 3.
    •   General 4 (vector) - Interpolated custom payload 4.

Material Pixel Output

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Writes material pixel outputs for color, masking, highlighting, velocity, and depth-dependent render paths.
  • Input pins:
    •   Default Transparency (integer, Mat Blending Mode) - Selects the default transparency mode used by the material output path.
    •   Custom Depth (logical) - When on, enables writing custom depth output.
    •   Proj Position (vector) - Projected position used for depth and shadow outputs.
    •   Screen Velocity (vector) - Screen-space velocity written to the velocity target when available.
    •   World Position (vector) - World position used by clipping and depth-related paths.
    •   World Normal (vector) - World normal used for normal-target output in normal render mode.
    •   Color (color) - Base material color contribution.
    •   Opacity (scalar) - Base material opacity contribution.
    •   Opac Clip Thresh (scalar) - Opacity threshold used by clip-style and shadow clipping.
    •   Additive (color) - Additive color contribution added to the base color.
    •   Mask Color (color) - Mask color written to the mask target.
    •   Mask Min Opac (scalar) - Minimum mask opacity used when building mask output.
    •   Highlight Color (color) - Color tint applied to the highlight output.
    •   Highlight Opac (scalar) - Opacity multiplier applied to the highlight output.
    •   Shadow Min Opac (scalar) - Minimum opacity used when rendering shadow outputs.
    •   Rasterizer State (rasterizer state) - Rasterizer state override for this pixel output stage.
    •   Depth Stencil State (depth stencil state) - Depth-stencil state override for this pixel output stage.
    •   Blend State (blend state) - Blend state override for this pixel output stage.
  • Output pins:

Material Vertex Input

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Provides mesh vertex attributes, transforms, and per-instance data for material vertex processing.
  • Input pins:
  • Output pins:
    •   World Transform (transformation) - Current world transform used for this vertex.
    •   Prev World Transform (transformation) - Previous-frame world transform used for motion-aware passes.
    •   Position (vector) - Input mesh position.
    •   Normal (vector) - Input mesh normal.
    •   Tangent (vector) - Input mesh tangent.
    •   Binormal (vector) - Input mesh binormal.
    •   Tex Coords 1 (vector) - First UV pair from vertex input.
    •   Tex Coords 2 (vector) - Second UV pair from vertex input.
    •   Color (color) - Vertex color after global and optional instance color multiplication.
    •   Opacity (scalar) - Vertex opacity after global and optional instance color multiplication.
    •   Aux Data (vector) - Auxiliary per-vertex payload from the mesh input.

Material Vertex Output

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Builds the material vertex-stage output payload from the supplied inputs.
  • Input pins:
    •   Proj Position (vector) - Projected position written to vertex output.
    •   Not Jittered Proj Position (vector) - Non-jittered projected position used for velocity-aware passes.
    •   Prev Not Jittered Proj Position (vector) - Previous-frame non-jittered projected position for velocity-aware passes.
    •   World Position (vector) - World position written to the output payload.
    •   World Normal (vector) - World normal written to the output payload.
    •   World Tangent (vector) - World tangent written to the output payload.
    •   World Binormal (vector) - World binormal written to the output payload.
    •   Tex Coords 1 (vector) - First UV pair written into texture coordinates.
    •   Tex Coords 2 (vector) - Second UV pair written into texture coordinates.
    •   Color (color) - Color channels of the output vertex color.
    •   Opacity (scalar) - Opacity channel of the output vertex color.
    •   General 1 (vector) - Custom payload 1 written to output.
    •   General 2 (vector) - Custom payload 2 written to output.
    •   General 3 (vector) - Custom payload 3 written to output.
    •   General 4 (vector) - Custom payload 4 written to output.
  • Output pins:

Postprocessing Pixel Input

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Provides source image sampling context for postprocessing pixel shading.
  • Input pins:
  • Output pins:
    •   Source Image (texture) - Source texture sampled by the postprocessing shader.
    •   Screen Position (vector) - Screen position of the current pixel sample.
    •   Tex Coords (vector) - Texture coordinates of the current pixel sample.
    •   Texel Delta (vector) - One-texel UV step for horizontal and vertical sampling.

Postprocessing Pixel Output

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Writes postprocessing pixel color with optional premultiplication and configurable output states.
  • Input pins:
    •   Color (color) - Output color channels before optional premultiplication.
    •   Opacity (scalar) - Output opacity channel before optional premultiplication.
    •   Premultiply (logical) - When on, premultiplies color channels by opacity before output.
    •   Rasterizer State (rasterizer state) - Rasterizer state override for this pixel output stage.
    •   Depth Stencil State (depth stencil state) - Depth-stencil state override for this pixel output stage.
    •   Blend State (blend state) - Blend state override for this pixel output stage.
  • Output pins:

Postprocessing Vertex Input

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Provides postprocessing full-screen vertex data to the shader graph.
  • Input pins:
  • Output pins:
    •   Screen Position (vector) - Clip-space screen position built from the input 2D vertex position.
    •   Tex Coords (vector) - Input texture coordinates for postprocessing sampling.

Postprocessing Vertex Output

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Builds the postprocessing vertex-stage output payload.
  • Input pins:
    •   Screen Position (vector) - Screen position written to the vertex output.
    •   Tex Coords (vector) - Texture coordinates written to the vertex output.
  • Output pins:

Rasterizer State

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Builds a rasterizer-state object for shader output configuration.
  • Input pins:
    •   Fill Mode (integer, Fill Mode) - Selects wireframe or solid fill mode.
    •   Cull Mode (integer, Cull Mode) - Selects which triangle face orientation is culled.
    •   Front Counter Clockwise (logical) - When on, treats counter-clockwise triangles as front faces.
    •   Depth Bias (integer) - Constant depth bias added during rasterization.
    •   Depth Bias Clamp (scalar) - Clamp value applied to computed depth bias.
    •   Slope Scaled Depth Bias (scalar) - Slope-scaled depth bias factor used during rasterization.
    •   Depth Clip Enable (logical) - When on, clips geometry outside the depth range.
    •   Scissor Enable (logical) - When on, enables scissor testing.
    •   Multisample Enable (logical) - When on, enables multisample processing for rasterization.
    •   Antialiased Line Enable (logical) - When on, enables antialiasing for line rendering where supported.
  • Output pins:
    •   Out (rasterizer state) - Configured rasterizer state object.

Scope Pixel Input

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Provides interpolated scope color to the pixel stage.
  • Input pins:
  • Output pins:
    •   Color (color) - Interpolated color from scope vertex output.

Scope Pixel Output

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Writes scope pixel color with configurable output states.
  • Input pins:
    •   Color (color) - Color written to the scope render target.
    •   Rasterizer State (rasterizer state) - Rasterizer state override for this pixel output stage.
    •   Depth Stencil State (depth stencil state) - Depth-stencil state override for this pixel output stage.
    •   Blend State (blend state) - Blend state override for this pixel output stage.
  • Output pins:

Scope Vertex Input

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Provides source-image dimensions and sampling coordinates for scope rendering vertices.
  • Input pins:
  • Output pins:
    •   Source Image (texture) - Source texture used by the scope pipeline.
    •   X (unsigned integer) - Horizontal sample coordinate in source-image pixels.
    •   Y (unsigned integer) - Vertical sample coordinate in source-image pixels.
    •   Tex Coords (vector) - Normalized texture coordinates derived from X and Y.

Scope Vertex Output

  • Category: Shaders: Input-Output
  • Access: All editions.
  • Function: Builds scope vertex output from projected position and color.
  • Input pins:
    •   Proj Position (vector) - Projected position written to scope vertex output.
    •   Color (color) - Color written to scope vertex output.
  • Output pins:
Article Content

Loading
Close
Loading spinner icon
1/10