How to use the postprocessing.ScanlineEffect function in postprocessing

To help you get started, we’ve selected a few postprocessing examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github slammayjammay / hyper-postprocessing / examples / effects / glitch / index.js View on Github external
module.exports = ({ hyperTerm, xTerm }) => {
	const effects = [];

	effects.push(new GlitchEffect({
		delay: new Vector2(1, 7),
		duration: new Vector2(0, 1),
		columns: 0.05
	}));

	effects.push(new BloomEffect({
		kernelSize: 3,
		distinction: 1,
		blendFunction: 1 // add
	}));

	effects.push(new ScanlineEffect({ density: 1.3 }));
	effects.push(new SepiaEffect({ intensity: 0.5 }));
	effects.push(new VignetteEffect({
		darkness: 0.6,
		offset: 0
	}));

	effects.push(new Effect(
		'curvedMonitorEffect',
		readFileSync(resolve(__dirname, '../../glsl/curved-monitor.glsl')).toString()
	));

	effects.push(new Effect(
		'sampling',
		readFileSync(resolve(__dirname, '../../glsl/sampling.glsl')).toString(),
		{
			blendFunction: 13 // normal -- overwrite