Contents

copy(sourceAccelerationStructure:destinationAccelerationStructure:)

Encodes a command to copy the data from one acceleration structure to another.

Declaration

func copy(sourceAccelerationStructure: any MTLAccelerationStructure, destinationAccelerationStructure: any MTLAccelerationStructure)

Parameters

  • sourceAccelerationStructure:

    The source acceleration structure.

  • destinationAccelerationStructure:

    The destination acceleration structure.

Discussion

The destination acceleration structure needs to be at least as large as the source acceleration structure, unless you’re compacting the source acceleration structure. In that case, the destination acceleration structure needs be at least as large as the compact size of the source acceleration structure.

If the source acceleration structure contains references to other acceleration structures, the copy of the acceleration structure also refers to the same child structures.

See Also

Copying an acceleration structure