angular-three-postprocessing

January 1, 2026 ยท View on GitHub

This is the main entry point for post-processing effects in Angular Three. It provides a way to apply various visual effects to your 3D scene after it has been rendered. This library relies on maath, three-stdlib, and postprocessing as dependencies.

Documentation

All public APIs are documented with JSDoc comments. Your IDE will provide inline documentation, parameter hints, and examples as you code.

Installation

npm install angular-three-postprocessing three-stdlib maath postprocessing
# yarn add angular-three-postprocessing three-stdlib maath postprocessing
# pnpm add angular-three-postprocessing three-stdlib maath postprocessing

NgtpEffectComposer

This is a wrapper component that manages and applies post-processing effects to your scene. It takes content children of effects and applies them in the order they are provided.

Usage

<ngtp-effect-composer [options]="{ multisampling: 0 }">
	<ngtp-bloom [options]="{ luminanceThreshold: 0.9, intensity: 0.5 }" />
	<ngtp-vignette [options]="{ darkness: 0.5 }" />
</ngtp-effect-composer>

Options (NgtpEffectComposerOptions)

PropertyDescriptionDefault Value
enabledWhether the effect composer is enabled.true
depthBufferWhether to use a depth buffer.undefined
enableNormalPassWhether to enable the normal pass. This is only used for SSGI currently.undefined
stencilBufferWhether to use a stencil buffer.undefined
autoClearWhether to automatically clear the output buffer before rendering.true
resolutionScaleA scaling factor for the resolution of the effect composer.undefined
multisamplingThe number of samples to use for multisample anti-aliasing (MSAA). Set to 0 to disable MSAA.8
frameBufferTypeThe data type to use for the frame buffer.HalfFloatType
renderPriorityThe render priority of the effect composer.1
cameraThe camera to use for rendering. If not provided, the default camera from the store will be used.undefined
sceneThe scene to render. If not provided, the default scene from the store will be used.undefined

Effects

All effects are available from angular-three-postprocessing:

EffectSelectorDescription
NgtpAsciingtp-asciiASCII art effect
NgtpBloomngtp-bloomBloom/glow effect
NgtpBrightnessContrastngtp-brightness-contrastBrightness and contrast adjustment
NgtpChromaticAberrationngtp-chromatic-aberrationChromatic aberration effect
NgtpColorAveragengtp-color-averageColor averaging effect
NgtpColorDepthngtp-color-depthColor depth reduction
NgtpDepthngtp-depthDepth visualization
NgtpDepthOfFieldngtp-depth-of-fieldDepth of field effect
NgtpDotScreenngtp-dot-screenDot screen effect
NgtpFXAAngtp-fxaaFast approximate anti-aliasing
NgtpGlitchngtp-glitchGlitch effect
NgtpGodRaysngtp-god-raysGod rays/light shafts
NgtpGridngtp-gridGrid overlay
NgtpHueSaturationngtp-hue-saturationHue and saturation adjustment
NgtpLensFlarengtp-lens-flareLens flare effect
NgtpLUTngtp-lutLUT (Look-Up Table) color grading
NgtpNoisengtp-noiseNoise effect
NgtpOutlinengtp-outlineOutline effect
NgtpPixelationngtp-pixelationPixelation effect
NgtpScanlinengtp-scanlineScanline effect
NgtpSelectiveBloomngtp-selective-bloomSelective bloom on specific objects
NgtpSepiangtp-sepiaSepia tone effect
NgtpShockWavengtp-shock-waveShock wave distortion
NgtpSMAAngtp-smaaSubpixel morphological anti-aliasing
NgtpTiltShiftngtp-tilt-shiftTilt-shift blur
NgtpTiltShift2ngtp-tilt-shift-2Alternative tilt-shift implementation
NgtpToneMappingngtp-tone-mappingTone mapping
NgtpVignettengtp-vignetteVignette darkening
NgtpWaterngtp-waterWater effect

Effect Example

import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { NgtpEffectComposer, NgtpBloom, NgtpVignette, NgtpNoise } from 'angular-three-postprocessing';

@Component({
	template: `
		<ngtp-effect-composer>
			<ngtp-bloom [options]="{ luminanceThreshold: 0.9, luminanceSmoothing: 0.025, intensity: 0.5 }" />
			<ngtp-noise [options]="{ opacity: 0.02 }" />
			<ngtp-vignette [options]="{ eskil: false, offset: 0.1, darkness: 1.1 }" />
		</ngtp-effect-composer>
	`,
	imports: [NgtpEffectComposer, NgtpBloom, NgtpVignette, NgtpNoise],
	schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class PostProcessing {}

N8AO (Ambient Occlusion)

A separate sub-library provides N8 Ambient Occlusion:

npm install n8ao
import { NgtpN8AO } from 'angular-three-postprocessing/n8ao';
<ngtp-effect-composer [options]="{ enableNormalPass: true }">
	<ngtp-n8ao [options]="{ aoRadius: 0.5, intensity: 1 }" />
</ngtp-effect-composer>