Interface: NoiseFilterOptions
Defined in: node_modules/pixi.js/lib/filters/defaults/noise/NoiseFilter.d.ts:22
Configuration options for the NoiseFilter.
The NoiseFilter adds random noise to the rendered content. The noise effect can be controlled through the noise intensity and an optional seed value for reproducible results.
Example
// Basic noise effect
const options: NoiseFilterOptions = {
noise: 0.5,
seed: Math.random()
};
// Create filter with options
const noiseFilter = new NoiseFilter(options);
Standard
Extends
Properties
antialias?
> optional antialias?: boolean | FilterAntialias
Defined in: node_modules/pixi.js/lib/filters/Filter.d.ts:37
If true the filter will make use of antialiasing. Although it looks better this can have a performance impact. If set to 'inherit', the filter will detect the antialiasing of the render target and change this automatically. Definitely don't set this to true if the render target has antialiasing set to false. As it will antialias, but you won't see the difference. (default 'off')
This can be a boolean or [FilterAntialias]FilterAntialias string.
Inherited from
blendMode?
> optional blendMode?: BLEND_MODES
Defined in: node_modules/pixi.js/lib/filters/Filter.d.ts:15
optional blend mode used by the filter when rendering (defaults to 'normal')
Inherited from
blendRequired?
> optional blendRequired?: boolean
Defined in: node_modules/pixi.js/lib/filters/Filter.d.ts:47
If this is set to true, the filter system will grab a snap shot of the area being rendered to and pass this into the shader. This is useful for blend modes that need to be aware of the pixels they are rendering to. Only use if you need that data, otherwise its an extra gpu copy you don't need! (default false)
If given, the shader should have a uniform named uBackTexture, which is where the pixels of the
area being rendered to can be sampled from.
Inherited from
clipToViewport?
> optional clipToViewport?: boolean
Defined in: node_modules/pixi.js/lib/filters/Filter.d.ts:53
If this is set to true, the filter system will clip filter texture into viewport This is useful for filters that applied to whole texture. (default true)
Inherited from
noise?
> optional noise?: number
Defined in: node_modules/pixi.js/lib/filters/defaults/noise/NoiseFilter.d.ts:35
The amount of noise to apply. Should be in range (0, 1]:
- 0.1 = subtle noise
- 0.5 = moderate noise (default)
- 1.0 = maximum noise
Default
0.5
Example
// Moderate noise effect
const noiseFilter = new NoiseFilter({ noise: 0.5 });
padding?
> optional padding?: number
Defined in: node_modules/pixi.js/lib/filters/Filter.d.ts:28
the amount of pixels to pad the container with when applying the filter. For example a blur extends the container out as it blurs, so padding is applied to ensure that extra detail is rendered as well without clipping occurring. (default 0)
Inherited from
resolution?
> optional resolution?: number | "inherit"
Defined in: node_modules/pixi.js/lib/filters/Filter.d.ts:22
the resolution the filter should be rendered at. The lower the resolution, the more performant the filter will be, but the lower the quality of the output. (default 1) If 'inherit', the resolution of the render target is used. Consider lowering this for things like blurs filters
Inherited from
seed?
> optional seed?: number
Defined in: node_modules/pixi.js/lib/filters/defaults/noise/NoiseFilter.d.ts:46
A seed value to apply to the random noise generation. Using the same seed will generate the same noise pattern.
Default
Math.random()
Example
// Using a fixed seed for reproducible noise
const noiseFilter = new NoiseFilter({ seed: 12345 });