Skip to main content

Module mesh_tangent_frames

Module mesh_tangent_frames 

Source
Expand description

Caller-buffered UV-aligned tangent frames for authored normal maps. Caller-buffered UV-aligned tangent frames for authored normal maps.

Enums§

StrictTangentFrameError
Strict derivative admission. The legacy tangent generator deliberately uses a fallback for missing/degenerate UVs; this opt-in path refuses those cases.
TangentFrameError

Functions§

tangents_from_uvs_into
Outputs xyz tangent and glTF handedness w. Six floats of scratch per vertex accumulate tangent/bitangent directions in deterministic triangle order. Invalid indices, streams and buffers fail before either output is touched.
tangents_from_uvs_strict_into
Generate UV-aligned tangents using the existing deterministic owner, after strict geometric/UV admission. UV orientation changes require vertex splits. temporary and scratch may change on failure; out is unchanged on all returned errors. No allocation occurs. The checked work charge is a bound on structural visits, not elapsed time or a bound on caller memory.