ShaderStoragePrimitive

data class ShaderStoragePrimitive(val name: String, val type: BufferPrimitiveType, val arraySize: Int = 1) : ShaderStorageElement(source)

Represents a primitive element within a shader storage buffer. This class enables detailed definition of a primitive type and its properties such as the buffer primitive type, array size and memory offset.

Constructors

Link copied to clipboard
constructor(name: String, type: BufferPrimitiveType, arraySize: Int = 1)

Properties

Link copied to clipboard
open override val arraySize: Int = 1

The number of elements in the array, default value is 1.

Link copied to clipboard
open override val name: String

The name of the shader storage primitive.

Link copied to clipboard

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

Functions

Link copied to clipboard
open override fun alignmentInBytes(): Int