Sets where the data begins in a buffer already bound to the fragment shader.
- iOS 8.3+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
Where the data begins, in bytes, from the start of the buffer.
The index in the buffer argument table.
Call this method to change the offset you specified when binding a single buffer with the
set method or multiple buffers with the
set method. You can also use this method to specify a data offset after binding data directly to the fragment shader with the
set method. Don’t rebind a buffer or block of data if you’re only updating its offset.
For buffers in the device address space, align the offset to the data type consumed by the fragment shader (which is always less than or equal to 16 bytes).
For buffers in the constant address space, align the offset to 256 bytes in macOS. In iOS, align the offset to the maximum of either the data type consumed by the fragment shader, or 4 bytes. A 16-byte alignment is safe in iOS if you don’t need to consider the data type.