|
@@ -104,12 +104,12 @@
|
|
|
|
|
|
// LIGHTS
|
|
|
|
|
|
- directionalLight = new THREE.DirectionalLight( 0xffeedd, 2 );
|
|
|
- directionalLight.position.set( 1, 0.5, 1 ).normalize();
|
|
|
+ directionalLight = new THREE.DirectionalLight( 0xffeedd, 1.5 );
|
|
|
+ directionalLight.position.set( 1, 0.5, 1 );
|
|
|
scene.add( directionalLight );
|
|
|
|
|
|
directionalLight = new THREE.DirectionalLight( 0xddddff, 0.5 );
|
|
|
- directionalLight.position.set( -1, 0.5, -1 ).normalize();
|
|
|
+ directionalLight.position.set( -1, 0.5, -1 );
|
|
|
scene.add( directionalLight );
|
|
|
|
|
|
// MATERIALS
|
|
@@ -179,13 +179,12 @@
|
|
|
// POSTPROCESSING
|
|
|
|
|
|
var renderModelUV = new THREE.RenderPass( scene, camera, materialUV, new THREE.Color( 0x575757 ) );
|
|
|
- var renderModel = new THREE.RenderPass( scene, camera );
|
|
|
|
|
|
var effectCopy = new THREE.ShaderPass( THREE.CopyShader );
|
|
|
|
|
|
var effectBloom1 = new THREE.BloomPass( 1, 15, 2, 512 );
|
|
|
- var effectBloom2 = new THREE.BloomPass( 1, 25, 4, 512 );
|
|
|
- var effectBloom3 = new THREE.BloomPass( 1, 25, 8, 512 );
|
|
|
+ var effectBloom2 = new THREE.BloomPass( 1, 25, 3, 512 );
|
|
|
+ var effectBloom3 = new THREE.BloomPass( 1, 25, 4, 512 );
|
|
|
|
|
|
effectBloom1.clear = true;
|
|
|
effectBloom2.clear = true;
|
|
@@ -195,7 +194,13 @@
|
|
|
|
|
|
//
|
|
|
|
|
|
- var pars = { minFilter: THREE.LinearMipmapLinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat, stencilBuffer: false };
|
|
|
+ var pars = {
|
|
|
+ minFilter: THREE.LinearMipmapLinearFilter,
|
|
|
+ magFilter: THREE.LinearFilter,
|
|
|
+ format: THREE.RGBFormat,
|
|
|
+ stencilBuffer: false
|
|
|
+ };
|
|
|
+
|
|
|
var rtwidth = 512;
|
|
|
var rtheight = 512;
|
|
|
|
|
@@ -226,28 +231,11 @@
|
|
|
//
|
|
|
|
|
|
var effectBeckmann = new THREE.ShaderPass( THREE.ShaderSkin[ "beckmann" ] );
|
|
|
-
|
|
|
composerBeckmann = new THREE.EffectComposer( renderer, new THREE.WebGLRenderTarget( rtwidth, rtheight, pars ) );
|
|
|
-
|
|
|
composerBeckmann.addPass( effectBeckmann );
|
|
|
|
|
|
//
|
|
|
|
|
|
- var effectBloom = new THREE.BloomPass( 0.25 );
|
|
|
-
|
|
|
- var effectBleach = new THREE.ShaderPass( THREE.BleachBypassShader );
|
|
|
- effectBleach.uniforms.opacity.value = 0.25;
|
|
|
-
|
|
|
- effectBleach.renderToScreen = true;
|
|
|
-
|
|
|
- composerFinal = new THREE.EffectComposer( renderer );
|
|
|
-
|
|
|
- composerFinal.addPass( renderModel );
|
|
|
- composerFinal.addPass( effectBloom );
|
|
|
- composerFinal.addPass( effectBleach );
|
|
|
-
|
|
|
- //
|
|
|
-
|
|
|
uniforms[ "tBlur1" ].value = composerScene.renderTarget2;
|
|
|
uniforms[ "tBlur2" ].value = composerUV1.renderTarget2;
|
|
|
uniforms[ "tBlur3" ].value = composerUV2.renderTarget2;
|
|
@@ -315,7 +303,6 @@
|
|
|
|
|
|
renderer.clear();
|
|
|
|
|
|
-
|
|
|
if ( firstPass ) {
|
|
|
|
|
|
composerBeckmann.render();
|
|
@@ -329,12 +316,10 @@
|
|
|
composerUV2.render();
|
|
|
composerUV3.render();
|
|
|
|
|
|
- //composerFinal.render( 0.1 );
|
|
|
renderer.render( scene, camera );
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
</body>
|