Very basic example of drawing a glow outline around a SceneKit node. Uses SCNTechnique with Metal shaders.
Code quality not guaranteed.
Based on / inspired by these nice SCNTechnique examples. https://github.com/lachlanhurst/SCNTechniqueTest https://github.com/kosua20/Technique-iOS
Update Main.storyboard to launch ViewController to view the ARSCNView demo.
For now you will have to manually add blur passes in NodeTechnique.plist. Check the 'sequence' key. This is where the blur passes are defined. Each blur stage requires two blur passes: a horizontal + vertical pass. So make sure to add 'pass_blur_h' along with 'pass_blur_v' or you will end up with an uneven glow.
You can pass the color from swift into the metal shader when setting up the technique here. It should look something like this:
let color = SCNVector3(1.0, 1.0, 0.0)
technique.setValue(NSValue(scnVector3: color), forKeyPath: "glowColorSymbol")
This project was created by Laan Labs. We design and build solutions at the intersection of Computer Vision and Augmented Reality.
SCNTechniqueGlow is released under the MIT License. See LICENSE for details.