CCEffectBloom Class Reference
| Inherits from | CCEffect : NSObject |
| Declared in | CCEffectBloom.h |
Overview
CCEffectBloom simulates bloooming of bright light when viewed against a darker background. A threshold value allows for the selection of pixels above a certain brightness level while radius and intensity parameters how large the bloom is and how much it contributes to the resulting image.
Tasks
Accessing Effect Attributes
-
luminanceThresholdproperty -
intensityproperty -
blurRadiusproperty
Initializing a CCEffectBloom object
Creating a CCEffectBloom object
Properties
blurRadius
The size of the blur of the bloom image. This value is in the range [0..6].
@property (nonatomic) NSUInteger blurRadiusDeclared In
CCEffectBloom.hClass Methods
effectWithBlurRadius:intensity:luminanceThreshold:
Creates a CCEffectBloom object with the specified parameters.
+ (id)effectWithBlurRadius:(NSUInteger)blurRadius intensity:(float)intensity luminanceThreshold:(float)luminanceThresholdParameters
- blurRadius
number of pixels blur will extend to (6 is the maximum, because we are limited by the number of varying variables that can be passed to a glsl program).
- intensity
ranges between 0.0-1.0 - defines the contrast of the glowing image. A higher value will make the glow more prevelant.
- luminanceThreshold
ranges between 0.0-1.0 - defines which part of the image should be glown via a luminance factor (brightness). A value of 0.0 will apply bloom to the whole image, a value of 1.0 will only apply bloom to the brightest part of the image.
Return Value
The CCEffectBloom object.
Declared In
CCEffectBloom.hInstance Methods
init
Initializes a CCEffectBloom object with the following default values: blurRadius = 2, intensity = 1, luminanceThreshold = 0
- (id)initReturn Value
The CCEffectBloom object.
Declared In
CCEffectBloom.hinitWithPixelBlurRadius:intensity:luminanceThreshold:
Initializes a CCEffectBloom object with the following default parameters:
- (id)initWithPixelBlurRadius:(NSUInteger)blurRadius intensity:(float)intensity luminanceThreshold:(float)luminanceThresholdParameters
- blurRadius
number of pixels blur will extend to (6 is the maximum, because we are limited by the number of varying variables that can be passed to a glsl program).
- intensity
ranges between 0.0-1.0 - defines the contrast of the glowing image. A higher value will make the glow more prevelant.
- luminanceThreshold
ranges between 0.0-1.0 - defines which part of the image should be glown via a luminance factor (brightness). A value of 0.0 will apply bloom to the whole image, a value of 1.0 will only apply bloom to the brightest part of the image.
Return Value
The CCEffectBloom object.
Declared In
CCEffectBloom.h