Skip to content

geometry#tangentBuffer

Summary

geometry#tangentBuffer exposes the uploaded vertex tangent channel for a custom render pass. The color and second-UV buffers similarly expose channels already packed for GPU binding.

Syntax

readonly Geometry.tangentBuffer: GPUBuffer
readonly Geometry.colorBuffer: GPUBuffer
readonly Geometry.uv1Buffer: GPUBuffer
const tangents = geometry.tangentBuffer;

Returns

GPUBuffer - A geometry-owned vertex buffer. Tangents and colors have four f32 lanes per vertex. The second UV set has two.

Notes

These getters throw before the channel has a GPU buffer and after final release. Call upload on the device that will use the buffers. A device change or channel reallocation can replace them.

See Also