Skip to content

GpuVertexFormat

1 min read

Import: import system.gpu;

This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation. Shader-only declarations can be used only inside @compute, @vertex, @fragment, inferred helpers and ray tracing shader functions; using them elsewhere is a compile error.

GpuVertexFormat

The type of one vertex attribute in a vertex buffer.

public enum GpuVertexFormat

Float32

One float.

Float32 = 0

Float32x2

Two floats, read as GpuVec2.

Float32x2 = 1

Float32x3

Three floats, read as GpuVec3.

Float32x3 = 2

Float32x4

Four floats, read as GpuVec4.

Float32x4 = 3

Sint32

One int.

Sint32 = 4

Uint32

One uint.

Uint32 = 5

Unorm8x4

Four bytes read as a GpuVec4 from 0.0 to 1.0, common for packed colors.

Unorm8x4 = 6