Closed hoangdado closed 5 years ago
By default, filter searches kernel shader in BBMetalImage project bundle, not in main bundle. From version 1.0.3, BBMetalImage can search kernel shader in main bundle. When you init a custom filter, pass true
to useMainBundleKernel
parameter.
super.init(kernelFunctionName: "testKernel", useMainBundleKernel: true)
Thanks @Silence-GitHub, now it is working :)
Hi @Silence-GitHub, thanks for your great project, i integrated BBMetalImage to my project and tested build-in filter succesfully. But when I tried to create a custom filter, it failed. Bewlow is the flow i did:
super.init(kernelFunctionName: "contrastKernel")
tosuper.init(kernelFunctionName: "testKernel")
The program crashed with error
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
at line 232:encoder.setComputePipelineState(computePipeline)
of file BBMetalBaseFilter.swiftHow could I solve this problem. Thanks in advanced!