How to use the ShaderPass function from three
Find comprehensive JavaScript three.ShaderPass code examples handpicked from public code repositorys.
GitHub: kentywang/Agamari
![kentywang profile picture](/kentywang.png?size=40)
134 135 136 137 138 139 140 141 142 143
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; composer.addPass( vignetteShader ); // Events
+ 15 other calls in file
113 114 115 116 117 118 119 120 121 122
console.error('THREE.EffectComposer relies on THREE.ShaderPass'); } this.copyPass = new THREE.ShaderPass(THREE.CopyShader); this.clock = new THREE.Clock(); };
GitHub: shianqi/3d-wind
![shianqi profile picture](/shianqi.png?size=40)
36 37 38 39 40 41 42 43 44
if (THREE.ShaderPass === undefined) { console.error('THREE.EffectComposer relies on THREE.ShaderPass') } this.copyPass = new THREE.ShaderPass(THREE.CopyShader) } Object.assign(THREE.EffectComposer.prototype, {
+ 3 other calls in file
GitHub: zya/apophenia
![zya profile picture](/zya.png?size=40)
66 67 68 69 70 71 72 73 74 75
var renderPass = new THREE.RenderPass(scene, camera); renderPass.clearAlpha = 0; composer.addPass(renderPass); var fxaa = new THREE.ShaderPass(THREE.FXAAShader); fxaa.uniforms.resolution.value.set(1 / (window.innerWidth * dpr), 1 / (window.innerHeight * dpr)); composer.addPass(fxaa); var bloomPass = new THREE.UnrealBloomPass(new THREE.Vector2(window.innerWidth, window.innerHeight), 1.9, 0.7, 0.5);
+ 19 other calls in file
1344 1345 1346 1347 1348 1349 1350 1351 1352
console.error( 'THREE.EffectComposer relies on THREE.ShaderPass' ); } this.copyPass = new THREE.ShaderPass( THREE.CopyShader ); this.clock = new THREE.Clock(); }
+ 35 other calls in file
3202 3203 3204 3205 3206 3207 3208 3209 3210 3211
} if(this.model.get('fxaa')){ console.log("fxaa active"); fxaaPass = new THREE.ShaderPass( THREE.FXAAShader ); const pixelRatio = renderer.getPixelRatio();
+ 33 other calls in file
1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212
exports.CopyShader = THREE.CopyShader; exports.EffectComposer = THREE.EffectComposer; exports.RenderPass = THREE.RenderPass; exports.OutlinePass = THREE.OutlinePass; exports.ShaderPass = THREE.ShaderPass; exports.MaskPass = THREE.MaskPass; exports.ClearMaskPass = THREE.ClearMaskPass;
+ 35 other calls in file
716 717 718 719 720 721 722 723 724
); composer.addPass( outlinePass ); composer.addPass( outlinePassRollover ); effectFXAA = new THREE.ShaderPass(THREE.FXAAShader); effectFXAA.uniforms['resolution'].value.set(1 / myView.dimensions.x, 1 / myView.dimensions.y ); effectFXAA.renderToScreen = true; composer.addPass( effectFXAA );
+ 2 other calls in file
three.Vector3 is the most popular function in three (22341 examples)