|
8 | 8 |
|
9 | 9 | #import "CCEffect.h"
|
10 | 10 |
|
| 11 | + |
| 12 | +/** |
| 13 | + * CCEffectGaussianBlur performs blur operation on the pixels of the attached node. |
| 14 | + */ |
| 15 | + |
11 | 16 | @interface CCEffectGaussianBlur : CCEffect
|
12 | 17 |
|
13 |
| -// blurRadius number of pixels blur will extend to (6 is the maximum, because we are limited by the number |
14 |
| -// of varying variables that can be passed to a glsl program). TODO: create a slower bloom shader, that does not have this restriction. |
| 18 | + |
| 19 | +/// ----------------------------------------------------------------------- |
| 20 | +/// @name Accessing Effect Attributes |
| 21 | +/// ----------------------------------------------------------------------- |
| 22 | + |
| 23 | +/** The size of the blur. This value is in the range [0..6]. |
| 24 | + */ |
15 | 25 | @property (nonatomic) NSUInteger blurRadius;
|
16 | 26 |
|
| 27 | + |
| 28 | +/// ----------------------------------------------------------------------- |
| 29 | +/// @name Initializing a CCEffectGaussianBlur object |
| 30 | +/// ----------------------------------------------------------------------- |
| 31 | + |
17 | 32 | /**
|
18 |
| - * @param blurRadius number of pixels blur will extend to (6 is the maximum, because we are limited by the number |
19 |
| - * of varying variables that can be passed to a glsl program). TODO: create a slower bloom shader, that does not have this restriction. |
| 33 | + * Initializes a CCEffectGaussianBlur object with the following default parameters: |
| 34 | + * blurRadius : 2 |
| 35 | + * |
| 36 | + * @return The CCEffectGaussianBlur object. |
20 | 37 | */
|
21 | 38 | -(id)init;
|
| 39 | + |
| 40 | +/** |
| 41 | + * Initializes a CCEffectGaussianBlur object with the specified parameters. |
| 42 | + * |
| 43 | + * @param blurRadius number of pixels blur will extend to (6 is the maximum, because we are limited by the number |
| 44 | + * of varying variables that can be passed to a glsl program). |
| 45 | + * |
| 46 | + * @return The CCEffectGaussianBlur object. |
| 47 | + */ |
22 | 48 | -(id)initWithPixelBlurRadius:(NSUInteger)blurRadius;
|
| 49 | + |
| 50 | + |
| 51 | +/// ----------------------------------------------------------------------- |
| 52 | +/// @name Creating a CCEffectGaussianBlur object |
| 53 | +/// ----------------------------------------------------------------------- |
| 54 | + |
| 55 | +/** |
| 56 | + * Creates a CCEffectGaussianBlur object with the specified parameters. |
| 57 | + * |
| 58 | + * @param blurRadius number of pixels blur will extend to (6 is the maximum, because we are limited by the number |
| 59 | + * of varying variables that can be passed to a glsl program). |
| 60 | + * |
| 61 | + * @return The CCEffectGaussianBlur object. |
| 62 | + */ |
23 | 63 | +(id)effectWithPixelBlurRadius:(NSUInteger)blurRadius;
|
24 | 64 |
|
25 | 65 | @end
|
|
0 commit comments