developer
2023-05-20 e12c7b4c22df631ebdcd16b2f98fbef8f738f92f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#import "GPUImage3x3TextureSamplingFilter.h"
 
/** This uses Sobel edge detection to place a black border around objects,
 and then it quantizes the colors present in the image to give a cartoon-like quality to the image.
 */
@interface GPUImageToonFilter : GPUImage3x3TextureSamplingFilter
{
    GLint thresholdUniform, quantizationLevelsUniform;
}
 
/** The threshold at which to apply the edges, default of 0.2
 */
@property(readwrite, nonatomic) CGFloat threshold; 
 
/** The levels of quantization for the posterization of colors within the scene, with a default of 10.0
 */
@property(readwrite, nonatomic) CGFloat quantizationLevels; 
 
@end