makeInstanceTransformResource(instanceCapacity:)
Creates a transform buffer resource for GPU instancing.
Declaration
func makeInstanceTransformResource(instanceCapacity: Int) throws -> LowLevelInstanceTransformResourceParameters
- instanceCapacity:
The maximum number of instances the buffer holds.
Return Value
A newly created LowLevelInstanceTransformResource.
Discussion
The buffer stores up to instanceCapacity model-to-local transforms as float4x4 values. Assign the result to a LowLevelMeshInstance via setInstanceTransforms(_:) to enable GPU instancing.