Ray Tracing, Apple Metal, Swift Programming, Gpu Rendering, Wwdc 2020.
textureDescriptor.usage = [.shaderWrite] outputTexture = device.makeTexture(descriptor: textureDescriptor)! //4 Encoding the command to the GPU computeEncoder?.pushDebugGroup(“State”) computeEncoder?.setComputePipelineState(computePipelineState) computeEncoder?.setTexture(outputTexture, index: 0)