How to use the postprocessing.SavePass 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 / retro / index.js View on Github external
module.exports = ({ hyperTerm, xTerm }) => {

const saveTarget = new THREE.WebGLRenderTarget(window.innerWidth, window.innerHeight, { format: THREE.RGBAFormat, stencilBuffer: false })
const savePass = new POSTPROCESSING.SavePass(saveTarget)

const burnInEffect = new GlslEffect('burn-in', { 
		uniforms: new Map([
			[ 'burnInSource', new THREE.Uniform(savePass.renderTarget.texture)], 
			[ 'burnInTime', new THREE.Uniform(0.4)], 
		]),
	}
);

const jitter = 0.3;
const screenCurvature = 0.2;

const retroEffect = new GlslEffect('retro', {
		uniforms: new Map([
			[ 'fontColor', new THREE.Uniform(new THREE.Vector3(200/255, 255/255, 110/255))], 
			[ 'backgroundColor', new THREE.Uniform(new THREE.Vector3(0.0, 0.05, 0.0))],