https://kotlinlang.org logo
l

lonto

11/01/2021, 2:25 PM
Hey! I am currently trying to implement a feature that uses
Metal
for iOS on the
expected implementation
on the
shared library module
. One of the steps is loading the shader library : iOS version
Copy code
let library = gpuDevice.makeDefaultLibrary()!
let function = library.makeFunction(name: "customEffect")
Kotlin version
Copy code
val library: MTLLibraryProtocol? = gpuDevice?.newDefaultLibrary()
I have done it before on iOS but I am wondering how it is possible to achieve the same on the shared module (.metal files on Android Studio), as the
.metal
files are required to load the library.