-
-
Save rmirabelli/3ba3d6690d10aea33ca0bc052a50ef87 to your computer and use it in GitHub Desktop.
Use those shaders
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
// vertex & fragment shader | |
descriptor.vertexFunction = runtimeLibrary?.makeFunction(name: "copy_vertex") | |
descriptor.fragmentFunction = runtimeLibrary?.makeFunction(name: "constant_color") | |
// framebuffer format | |
descriptor.colorAttachments[0].pixelFormat = .bgra8Unorm | |
// compile to MTLPRenderPipelineState | |
let renderPipeline = try device?.makeRenderPipelineState(descriptor: descriptor) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment