|
@@ -100,6 +100,7 @@ THREE.SAOPass = function ( scene, camera, depthTexture, useNormals, resolution )
|
|
|
fragmentShader: THREE.DepthLimitedBlurShader.fragmentShader
|
|
|
} );
|
|
|
this.vBlurMaterial.defines[ 'DEPTH_PACKING' ] = this.supportsDepthTextureExtension ? 0 : 1;
|
|
|
+ this.vBlurMaterial.defines[ 'PERSPECTIVE_CAMERA' ] = this.camera.isPerspectiveCamera ? 1 : 0;
|
|
|
this.vBlurMaterial.uniforms[ 'tDiffuse' ].value = this.saoRenderTarget.texture;
|
|
|
this.vBlurMaterial.uniforms[ 'tDepth' ].value = ( this.supportsDepthTextureExtension ) ? depthTexture : this.depthRenderTarget.texture;
|
|
|
this.vBlurMaterial.uniforms[ 'size' ].value.set( this.resolution.x, this.resolution.y );
|
|
@@ -112,6 +113,7 @@ THREE.SAOPass = function ( scene, camera, depthTexture, useNormals, resolution )
|
|
|
fragmentShader: THREE.DepthLimitedBlurShader.fragmentShader
|
|
|
} );
|
|
|
this.hBlurMaterial.defines[ 'DEPTH_PACKING' ] = this.supportsDepthTextureExtension ? 0 : 1;
|
|
|
+ this.hBlurMaterial.defines[ 'PERSPECTIVE_CAMERA' ] = this.camera.isPerspectiveCamera ? 1 : 0;
|
|
|
this.hBlurMaterial.uniforms[ 'tDiffuse' ].value = this.blurIntermediateRenderTarget.texture;
|
|
|
this.hBlurMaterial.uniforms[ 'tDepth' ].value = ( this.supportsDepthTextureExtension ) ? depthTexture : this.depthRenderTarget.texture;
|
|
|
this.hBlurMaterial.uniforms[ 'size' ].value.set( this.resolution.x, this.resolution.y );
|