Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    • How this node obtains its normals, as ONE value.

      The full §3.4 rule in one place: stored normals are used iff shading === 'smooth' AND the node actually has them AND they were authored for the axes currently displayed. Every other lit case — explicit 'flat', absent normals, or a frame mismatch — takes the derivative fallback, which is correct for the projected geometry, just faceted rather than smoothed.

      'none' short-circuits ahead of all of that, and the ORDER matters: an unlit mesh needs no normal, so falling through to the derivative fallback would compute one and discard it. It is also the only arm that is NOT view-dependent — the other two can flip on a displayDims change, this one is purely authored — which is why it is answered before anything reads storedNormalsUsable.

      Returns an enum rather than the earlier flatNormal boolean: a second boolean for the unlit arm would admit a meaningless flatNormal && noShading state and double the shader variant count for something with one behaviour.

      storedNormalsUsable already folds in "has normals at all" (it is false without normal_dims), so has_normals is checked here only to keep the rule readable against a hand-built attrs object in a test.

      Parameters

      Returns MeshShadingMode