The .drft container · const

ATTR_TANGENT

Added in 1.4, and the first optional attribute wider than three floats a vertex.

Explained in The .drft container.

const ATTR_TANGENT: number
import { ATTR_TANGENT } from '@driftengine/drft';

In depth

A tangent frame: xyz running with u, and the bitangent's handedness in w. Four floats rather than three because a UV layout can mirror, and a bitangent computed without the sign lights one side of a model inside out. See generateTangents for the derivation.

Next free bit, appended last, exactly as grain and relief each explain at length: a 1.3 reader meets the six arrays it knows in the six places it expects them, stops before this one, and draws the asset with no tangent frame — which is what a reader that has never heard of tangents should produce, and which is precisely what today's shaders do with one.