Home Reference Source
import {PixelationMaterial} from 'postprocessing/src/materials/PixelationMaterial.js'
public class | source

PixelationMaterial

Extends:

three~ShaderMaterial → PixelationMaterial

A pixelation shader material.

Original shader code by Robert Casanova: https://github.com/robertcasanova/pixelate-shader

Constructor Summary

Public Constructor
public

Constructs a new pixelation material.

Member Summary

Public Members
public get

The pixel granularity.

public set

A higher value yields coarser visuals.

Method Summary

Public Methods
public

setResolution(width: Number, height: Number)

Sets the resolution.

Public Constructors

public constructor() source

Constructs a new pixelation material.

Public Members

public get granularity: Number source

The pixel granularity.

public set granularity: Number source

A higher value yields coarser visuals.

Public Methods

public setResolution(width: Number, height: Number) source

Sets the resolution.

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.