Skip to content

Instantly share code, notes, and snippets.

View DamienBell's full-sized avatar

Damien Bell DamienBell

View GitHub Profile
@Farini
Farini / BLKTransparent.swift
Last active March 10, 2024 07:49
CIFilter with Metal shader
/**
A CIFilter that uses a Metal function that converts a black pixel (or almost black) to a transparent pixel.
*/
class BLKTransparent: CIFilter {
private var kernel: CIColorKernel
var inputImage: CIImage?
var threshold: Float?
anonymous
anonymous / SceneKit Parabola
Created July 14, 2015 17:13
import SceneKit
// Set up a SceneKit view
let view = SCNView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
view.autoenablesDefaultLighting = true
view.scene = SCNScene()
let root = view.scene!.rootNode
// Display it live
import XCPlayground