Typed vertex attributes

Both boxes use the same geometry, rescaled into different typed arrays. The left one stores position/normal/uv as Float32Array (32 bytes per vertex). The right one stores them as normalized Int16Array/Int8Array/Uint8Array (11 bytes per vertex, a third the size) with the normalized flag telling the GPU to rescale the integers back to the same floats. Same shading, less memory.

← all examples