Figure: Diagnostic workflow: Vertex calculation → Interpolation/type/space → Fragment use
Figure: Diagnostic workflow: Vertex calculation → Interpolation/type/space → Fragment use

Cause and mechanism

A Custom Interpolator passes a value calculated at vertices to the Fragment stage, smoothly varying it across the surface. If the value renders incorrectly, check that both stages use the same coordinate space. Also check interpolator usage against the target platform's limit.

Check and correct the setup

  1. Keep producer and consumer spaces consistent; object-space data need not be converted to world space.
    Match element count, type and bounds
    Match element count, type and bounds
  2. Normalize interpolated directions/normals when required.
    Match element count, type and bounds
    Match element count, type and bounds
  3. Check compile warnings and varying budgets; transmit only the needed components.
    Match element count, type and bounds
    Match element count, type and bounds

Limits and verification

Interpolating nonlinear vertex calculations differs from evaluating them per fragment, especially on coarse meshes. Compare quality and performance.

Shader Graph Custom Interpolators

A focused diagnostic setup

Compare a vertex-computed custom interpolator against the same expression evaluated per fragment on a coarse plane.

Test in this order

  1. Pass a simple position value first and verify type/space.
    Match element count, type and bounds
    Match element count, type and bounds
  2. Compare normalization after interpolating directions.
    Match element count, type and bounds
    Match element count, type and bounds
  3. Vary nonlinear expressions and mesh density while checking target-API interpolator warnings.
    Match element count, type and bounds
    Match element count, type and bounds

Interpret the result

Interpolating a nonlinear vertex result differs from evaluating after interpolation. Move only operations meeting the visual requirement and avoid unused components.

Related explanations

References