The idea was clear to me. I did not know what a real filter is. Having figured this out, SKSpriteNode is nodeWithImage, the image is a blurry ball. The physical body is a ball with a smaller body than the image (so that the balls can move slightly on top of each other and become "one part"). The threshold filter is set to the scene, for example:
CIFilter *filter = [CIFilter filterWithName:@"CIColorPosterize"];
[filter setValue:@(2.0) forKey:@"inputLevels"];
[scene setFilter:filter];
[scene setShouldEnableEffects:YES];
So that if anyone ever reads it and has a problem, he more than welcomes to let me know for help.
source
share