Skip to content

General Effects ​

Manages standard post-processing effects provided under the RedGPU.PostEffect namespace, such as Gaussian blur, color adjustments, depth of field (DoF), and fog.

1. Usage ​

Create an effect instance and register it via view.postEffectManager.addEffect(). When multiple effects are added, a pipeline chain is formed in the order of registration.

javascript
// 1. Create and add an effect
const gaussianBlur = new RedGPU.PostEffect.GaussianBlur(redGPUContext);
view.postEffectManager.addEffect(gaussianBlur);

// 2. Remove a specific effect or clear all effects
view.postEffectManager.removeEffect(gaussianBlur);
view.postEffectManager.removeAllEffect();

2. Key Effect Examples ​

2.1 Gaussian Blur (GaussianBlur) ​

The most common blur effect that smoothly softens the screen image.

2.2 Grayscale (Grayscale) ​

Removes color saturation from the screen to convert it into a black-and-white image.

3. Full Support List ​

All general effects are located under the RedGPU.PostEffect namespace.

CategoryClass NameDescription
BlurBlur, GaussianBlurGaussian blur (the most common blur effect)
BlurX, BlurYUnidirectional (horizontal or vertical) blur
DirectionalBlurBlur effect in a specified angle direction
RadialBlurBlur effect spreading outward from the center in a circle
ZoomBlurBlur effect expanding outward from the center
AdjustmentsBrightnessContrastBrightness and contrast adjustment
HueSaturationHue and saturation adjustment
ColorBalanceColor balance adjustment (midtones, shadows, highlights)
ColorTemperatureTintColor temperature and tint adjustment
VibranceVibrance adjustment (affects mainly unsaturated parts)
GrayscaleConverts the image to black and white
InvertColor inversion
ThresholdBinarization based on a threshold
LensOldBloomClassic light bleeding effect (operates in HDR phase)
DOFDepth of Field (blurs areas out of focus)
VignettingDarkens the outer edges of the screen
ChromaticAberrationRecreates lens chromatic aberration
LensDistortionLens distortion effect
AtmosphericFogDistance-based fog effect
HeightFogHeight-based fog effect
Visual / UtilityFilmGrainFilm noise (grain) effect
SharpenSharpening
ConvolutionKernel-based filter (supports Sharpen, Edge, Emboss, etc.)


Next Steps ​