General Effects
RedGPU provides various standard effects, such as radial blur and grayscale, managed through the PostEffectManager.
[Learning Guide]
Technically, tone mapping is executed at the very first stage of the overall post-processing, but in this chapter, we first cover General Effects where visual changes can be experienced most intuitively.
1. Usage (addEffect)
After creating an effect object, register it through view.postEffectManager.addEffect(). A pipeline chain is formed in the order of registration.
const radialBlur = new RedGPU.PostEffect.RadialBlur(redGPUContext);
view.postEffectManager.addEffect(radialBlur);2. Key Effect Examples
2.1 Radial Blur
Creates a sense of speed or concentration effects that radiate outward from a center point.
2.2 Grayscale
Converts the image to black and white to create a classic atmosphere.
3. Full Support List
Here is the complete list of all general effects provided by RedGPU. All effects are located under the RedGPU.PostEffect namespace.
| Category | Class Name | Description |
|---|---|---|
| Blur | Blur, GaussianBlur | Gaussian blur (the most common blur effect) |
BlurX, BlurY | Unidirectional (horizontal or vertical) blur | |
DirectionalBlur | Blur effect in a specified angle direction | |
RadialBlur | Blur effect spreading outward from the center in a circle | |
ZoomBlur | Blur effect expanding outward from the center | |
| Adjustments | BrightnessContrast | Brightness and contrast adjustment |
HueSaturation | Hue and saturation adjustment | |
ColorBalance | Color balance adjustment (midtones, shadows, highlights) | |
ColorTemperatureTint | Color temperature and tint adjustment | |
Vibrance | Vibrance adjustment (affects mainly unsaturated parts) | |
Grayscale | Converts the image to black and white | |
Invert | Color inversion | |
Threshold | Binarization based on a threshold | |
| Lens | OldBloom | Classic light bleeding effect |
DOF | Depth of Field (blurs areas out of focus) | |
Vignetting | Darkens the outer edges of the screen | |
ChromaticAberration | Recreates lens chromatic aberration | |
LensDistortion | Lens distortion effect | |
| Atmospheric | Fog | Distance-based fog effect |
HeightFog | Height-based fog effect | |
| Visual / Utility | FilmGrain | Film noise (grain) effect |
Sharpen | Sharpening | |
Convolution | Kernel-based filter (supports Sharpen, Edge, Emboss, etc.) |
[Check Live]
All the effects listed above can be checked in real-time demos in the PostEffect category of the RedGPU Official Examples Page.
Key Summary
- You can layer effects in any order using
addEffect(). - All effect objects require a
redGPUContextupon creation. - Actual rendering is performed immediately after the tone mapping stage.