Created
June 6, 2019 06:00
-
-
Save quentinfasquel/9aff183ec71c75b58142a6c55a08887c to your computer and use it in GitHub Desktop.
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
import CoreImage | |
class AlphaFrameFilter: CIFilter { | |
static var kernel: CIColorKernel? = { | |
return CIColorKernel(source: """ | |
kernel vec4 alphaFrame(__sample s, __sample m) { | |
return vec4( s.rgb, m.r ); | |
} | |
""") | |
}() | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment