[kit] Create Metal library from Kit bundle, rather than main bundle
This commit is contained in:
parent
b028a9ed2e
commit
a07bced808
1 changed files with 2 additions and 1 deletions
|
@ -35,7 +35,8 @@ public class Renderer: NSObject, MTKViewDelegate {
|
|||
view.device = device
|
||||
|
||||
do {
|
||||
let library = try device.makeDefaultLibrary(bundle: Bundle.main)
|
||||
let bundle = Bundle(for: type(of: self))
|
||||
let library = try device.makeDefaultLibrary(bundle: bundle)
|
||||
let vertexShader = library.makeFunction(name: "passthroughVertexShader")
|
||||
let fragmentShader = library.makeFunction(name: "sampleToColorShader")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue