|
@@ -27,7 +27,7 @@ THREE.BloomPass = function ( strength, kernelSize, sigma, resolution ) {
|
|
|
|
|
|
this.copyUniforms = Object.assign( {}, copyShader.uniforms );
|
|
this.copyUniforms = Object.assign( {}, copyShader.uniforms );
|
|
|
|
|
|
- this.copyUniforms[ "opacity" ].value = strength;
|
|
|
|
|
|
+ this.copyUniforms[ "opacity" ] = { value: strength };
|
|
|
|
|
|
this.materialCopy = new THREE.ShaderMaterial( {
|
|
this.materialCopy = new THREE.ShaderMaterial( {
|
|
|
|
|
|
@@ -48,8 +48,8 @@ THREE.BloomPass = function ( strength, kernelSize, sigma, resolution ) {
|
|
|
|
|
|
this.convolutionUniforms = Object.assign( {}, convolutionShader.uniforms );
|
|
this.convolutionUniforms = Object.assign( {}, convolutionShader.uniforms );
|
|
|
|
|
|
- this.convolutionUniforms[ "uImageIncrement" ].value = THREE.BloomPass.blurX;
|
|
|
|
- this.convolutionUniforms[ "cKernel" ].value = THREE.ConvolutionShader.buildKernel( sigma );
|
|
|
|
|
|
+ this.convolutionUniforms[ "uImageIncrement" ] = { value: THREE.BloomPass.blurX };
|
|
|
|
+ this.convolutionUniforms[ "cKernel" ] = { value: THREE.ConvolutionShader.buildKernel( sigma ) };
|
|
|
|
|
|
this.materialConvolution = new THREE.ShaderMaterial( {
|
|
this.materialConvolution = new THREE.ShaderMaterial( {
|
|
|
|
|
|
@@ -85,16 +85,16 @@ THREE.BloomPass.prototype = Object.assign( Object.create( THREE.Pass.prototype )
|
|
|
|
|
|
this.quad.material = this.materialConvolution;
|
|
this.quad.material = this.materialConvolution;
|
|
|
|
|
|
- this.convolutionUniforms[ "tDiffuse" ].value = readBuffer.texture;
|
|
|
|
- this.convolutionUniforms[ "uImageIncrement" ].value = THREE.BloomPass.blurX;
|
|
|
|
|
|
+ this.convolutionUniforms[ "tDiffuse" ] = { value: readBuffer.texture };
|
|
|
|
+ this.convolutionUniforms[ "uImageIncrement" ] = { value: THREE.BloomPass.blurX };
|
|
|
|
|
|
renderer.render( this.scene, this.camera, this.renderTargetX, true );
|
|
renderer.render( this.scene, this.camera, this.renderTargetX, true );
|
|
|
|
|
|
|
|
|
|
// Render quad with blured scene into texture (convolution pass 2)
|
|
// Render quad with blured scene into texture (convolution pass 2)
|
|
|
|
|
|
- this.convolutionUniforms[ "tDiffuse" ].value = this.renderTargetX.texture;
|
|
|
|
- this.convolutionUniforms[ "uImageIncrement" ].value = THREE.BloomPass.blurY;
|
|
|
|
|
|
+ this.convolutionUniforms[ "tDiffuse" ] = { value: this.renderTargetX.texture };
|
|
|
|
+ this.convolutionUniforms[ "uImageIncrement" ] = { value: THREE.BloomPass.blurY };
|
|
|
|
|
|
renderer.render( this.scene, this.camera, this.renderTargetY, true );
|
|
renderer.render( this.scene, this.camera, this.renderTargetY, true );
|
|
|
|
|
|
@@ -102,7 +102,7 @@ THREE.BloomPass.prototype = Object.assign( Object.create( THREE.Pass.prototype )
|
|
|
|
|
|
this.quad.material = this.materialCopy;
|
|
this.quad.material = this.materialCopy;
|
|
|
|
|
|
- this.copyUniforms[ "tDiffuse" ].value = this.renderTargetY.texture;
|
|
|
|
|
|
+ this.copyUniforms[ "tDiffuse" ] = { value: this.renderTargetY.texture };
|
|
|
|
|
|
if ( maskActive ) renderer.context.enable( renderer.context.STENCIL_TEST );
|
|
if ( maskActive ) renderer.context.enable( renderer.context.STENCIL_TEST );
|
|
|
|
|