How to use the EffectComposer function from three

Find comprehensive JavaScript three.EffectComposer code examples handpicked from public code repositorys.

131
132
133
134
135
136
137
138
139
140
// effect composer for post-processing (renderer goes thru this)
var parameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAFormat, stencilBuffer: false };

var renderTarget = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, parameters );

composer = new THREE.EffectComposer( renderer, renderTarget );
composer.addPass( new THREE.RenderPass( scene, camera ) );

var vignetteShader = new THREE.ShaderPass( THREE.VignetteShader );
vignetteShader.renderToScreen = true;
fork icon15
star icon47
watch icon10

+ 15 other calls in file

44
45
46
47
48
49
50
51
52
53

                renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera );

        } else {

                renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera, writeBuffer, this.clear );

        }

}
fork icon9
star icon36
watch icon16

+ 35 other calls in file

52
53
54
55
56
57
58
59
60
//   stencilBuffer: false
// };

// var renderTarget = new THREE.WebGLRenderTarget(window.innerWidth, window.innerHeight, parameters);

var composer = new THREE.EffectComposer(renderer);
composer.renderTarget1.texture.format = THREE.RGBAFormat;
composer.renderTarget2.texture.format = THREE.RGBAFormat;
composer.setSize(window.innerWidth * dpr, window.innerHeight * dpr);
fork icon2
star icon28
watch icon3

+ 9 other calls in file

3141
3142
3143
3144
3145
3146
3147
3148
3149

//this.animate();


const renderPass = new THREE.RenderPass( this.scene, this.camera );
const composer = new THREE.EffectComposer( this.renderer );

composer.addPass( renderPass );

fork icon3
star icon7
watch icon1

+ 17 other calls in file

179
180
181
182
183
184
185
186
187
188
  var renderModel = new THREE.RenderPass( scene, camera );
  var effectFilm = new THREE.FilmPass( 0.35, 0.75, 2048, false );

  effectFilm.renderToScreen = true;

  composer = new THREE.EffectComposer( renderer );

  composer.addPass( renderModel );
  composer.addPass( effectFilm );
}
fork icon0
star icon3
watch icon5

1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
	}


});


exports.CopyShader = THREE.CopyShader;
exports.EffectComposer = THREE.EffectComposer;
exports.RenderPass = THREE.RenderPass;
exports.OutlinePass = THREE.OutlinePass;
exports.ShaderPass = THREE.ShaderPass;
exports.MaskPass = THREE.MaskPass;
fork icon0
star icon0
watch icon1

+ 17 other calls in file

84
85
86
87
88
89
90
91
92
93
  options.bloomStrength,
  options.bloomRadius,
  options.bloomThreshold
);

const composer = new THREE.EffectComposer(renderer);
composer.addPass(renderPass);
composer.addPass(bloomPass);

const controls = new THREE.OrbitControls(camera, canvas);
fork icon0
star icon0
watch icon0

+ 2 other calls in file

671
672
673
674
675
676
677
678
679
	
	TweenLite.to(myView.controls.object.view,0.6, {offsetX:-450,ease:Power2.easeOut,onUpdate:update });
} */

/* ------------  postprocessing -------------- */
composer = new THREE.EffectComposer( myView.renderer );

var renderPass = new THREE.RenderPass( myScene.scene, myView.camera );
composer.addPass( renderPass );
fork icon0
star icon0
watch icon0

+ 2 other calls in file

32
33
34
35
36
37
38
39
40
41

        this.copyPass = new THREE.ShaderPass( THREE.CopyShader );

};

Object.assign( THREE.EffectComposer.prototype, {

        swapBuffers: function() {

                var tmp = this.readBuffer;
fork icon0
star icon0
watch icon2

+ 8 other calls in file

51
52
53
54
55
56
57
58
59
60
this.renderer = new THREE.WebGLRenderer({
    canvas: this.canvas.domElement,
    alpha: true
});
this.renderer.setSize(window.innerWidth, window.innerHeight);
this.composer = new THREE.EffectComposer(this.renderer);
this.viewMode = VIEW_MODE.ORBIT;
// Empty all arrays
this.grounds = [];
this.obstacles = [];
fork icon0
star icon0
watch icon2

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)