[kit] Create Metal library from Kit bundle, rather than main bundle

This commit is contained in:
Eryn Wells 2017-08-24 17:59:18 -07:00
parent b028a9ed2e
commit a07bced808

View file

@ -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")