Overview
Atlas provides a comprehensive post-processing effects system that can be applied to render targets. Effects are applied via shader uniforms and can be stacked for complex visual results.Effect Base Class
All effects inherit from theEffect base class.
The type of effect this instance represents.
Applies the effect’s parameters to the shader program.Parameters:
program- The shader program to apply the effect toindex- The index of the effect in the effect array
RenderTargetEffect
Available post-processing effects:
Invert- Inverts the colors of the rendered imageGrayscale- Converts the rendered image to grayscaleSharpen- Applies a sharpening filter to enhance edgesBlur- Applies a blur effect to the rendered imageEdgeDetection- Detects and highlights edgesColorCorrection- Applies color correction adjustmentsMotionBlur- Simulates camera motion by streaking samplesChromaticAberration- Separates color channels to recreate lens dispersionPosterization- Reduces available color palette for stylized lookPixelation- Divides screen into coarse blocks (retro aesthetic)Dilation- Expands bright regions outward (glow/bloom)FilmGrain- Adds animated noise to mimic analog film
Effect Types
Inversion
Inverts all colors in the rendered image (white becomes black, red becomes cyan, etc.).Creates an inversion effect.Returns: Shared pointer to the effect
Grayscale
Converts the rendered image to grayscale by calculating luminance.Creates a grayscale effect.Returns: Shared pointer to the effect
Sharpen
Applies a sharpening kernel to enhance edges and details.Creates a sharpen effect.Returns: Shared pointer to the effect
Blur
Applies a Gaussian blur to the rendered image.The magnitude (radius) of the blur effect. Higher values create stronger blur.
Creates a blur effect.Parameters:
magnitude- Blur radius (default:16.0)
EdgeDetection
Detects and highlights edges using an edge detection kernel.Creates an edge detection effect.Returns: Shared pointer to the effect
ColorCorrection
Applies comprehensive color correction including exposure, contrast, saturation, gamma, temperature, and tint.ColorCorrectionParameters
Exposure adjustment. Positive values brighten, negative values darken.
Contrast adjustment. Values > 1.0 increase contrast, < 1.0 decrease it.
Saturation adjustment. 1.0 is normal, 0.0 is grayscale, > 1.0 increases saturation.
Gamma correction value. Typically around 1.0 to 2.2.
Temperature adjustment. Positive values add warmth (red), negative values add coolness (blue).
Tint adjustment. Positive values add green, negative values add magenta.
Creates a color correction effect.Parameters:
p- Color correction parameters (default:{})
MotionBlur
Blends samples along motion vectors to create dynamic blur.MotionBlurParameters
Number of samples taken along the motion vector.
Scaling factor applied to the velocity vector when sampling.
Creates a motion blur effect.Parameters:
p- Motion blur parameters (default:{})
ChromaticAberration
Offsets color channels to emulate lens dispersion artifacts.ChromaticAberrationParameters
Red channel offset strength.
Green channel offset strength.
Blue channel offset strength.
Direction toward which the channels shift.
Creates a chromatic aberration effect.Parameters:
p- Chromatic aberration parameters (default:{})
Posterization
Clamps colors to a fixed number of bands for stylized shading.PosterizationParameters
Number of tonal levels to preserve in the final image.
Creates a posterization effect.Parameters:
p- Posterization parameters (default:{})
Pixelation
Renders the scene with large pixel blocks for a retro aesthetic.PixelationParameters
Size, in screen pixels, of each pixelated block.
Creates a pixelation effect.Parameters:
p- Pixelation parameters (default:{})
Dilation
Expands bright fragments to create a blooming halo.DilationParameters
Radius, in pixels, used when sampling neighbourhood texels.
Distance multiplier applied when stepping through neighbour samples.
Creates a dilation effect.Parameters:
p- Dilation parameters (default:{})
FilmGrain
Overlays animated grain for a cinematic feel.FilmGrainParameters
Intensity of the noise pattern added to each frame.
Creates a film grain effect.Parameters:
p- Film grain parameters (default:{})