Skip to content
🎉 Angular Three v4 is here! Read the announcement

NgtpPixelation

The pixelation effect reduces the resolution of the rendered image, creating a retro, 8-bit style appearance.

import { NgtpEffectComposer, NgtpPixelation } from 'angular-three-postprocessing';
@Component({
template: `
<ngtp-effect-composer>
<ngtp-pixelation [options]="{ granularity: 8 }" />
</ngtp-effect-composer>
`,
imports: [NgtpEffectComposer, NgtpPixelation],
})
export class SceneGraph {}
PropertyTypeDefaultDescription
granularitynumber5Pixel size (higher = more pixelated)
@Component({
template: `
<ngt-mesh>
<ngt-dodecahedron-geometry *args="[1]" />
<ngt-mesh-standard-material color="limegreen" />
</ngt-mesh>
<ngtp-effect-composer>
<ngtp-pixelation [options]="{ granularity: 10 }" />
<!-- Add color depth reduction for full retro effect -->
<ngtp-color-depth [options]="{ bits: 4 }" />
</ngtp-effect-composer>
`,
imports: [NgtpEffectComposer, NgtpPixelation, NgtpColorDepth, NgtArgs],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class SceneGraph {}
  • Higher granularity values create larger pixels
  • Combine with NgtpColorDepth for authentic retro game aesthetics
  • Works well with NgtpScanline for CRT monitor simulation
  • Consider reducing scene complexity when using heavy pixelation