primitive

fun primitive(name: String, type: BufferPrimitiveType, arraySize: Int = 1)(source)

Adds a primitive element to the shader storage format.

Parameters

name

The name of the primitive element to be added.

type

The type of the primitive, represented by the BufferPrimitiveType enumeration.

arraySize

The number of elements in the array for this primitive. Defaults to 1.