Created
September 26, 2021 18:17
-
-
Save MasDennis/c1e1513c63bdeed1090809d9c9fa64ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guard let computePipelineState = self.computePipelineState, | |
let encoder = context.commandBuffer.makeComputeCommandEncoder() | |
else { | |
return | |
} | |
encoder.setComputePipelineState(computePipelineState) | |
encoder.setTexture(context.sourceColorTexture, index: 0) | |
encoder.setTexture(context.targetColorTexture, index: 1) | |
encoder.dispatchThreadgroups(self.threadgroupsPerGrid, threadsPerThreadgroup: self.threadsPerThreadgroup) | |
encoder.endEncoding() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment