Skip to content

Commit

Permalink
All post processing working
Browse files Browse the repository at this point in the history
  • Loading branch information
tentone committed Apr 26, 2019
1 parent 2356e37 commit ddc33d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions source/core/postprocessing/EffectComposer.js
Expand Up @@ -365,6 +365,7 @@ EffectComposer.fromJSON = function(json)
pass.kernelRadius = data.kernelRadius;
pass.minDistance = data.minDistance;
pass.maxDistance = data.maxDistance;
pass.kernelSize = data.kernelSize;
}
else if(data.type === "SSAO")
{
Expand Down
7 changes: 1 addition & 6 deletions source/core/postprocessing/pass/AdaptiveToneMappingPass.js
Expand Up @@ -58,12 +58,7 @@ function AdaptiveToneMappingPass(adaptive, resolution)
blending: THREE.NoBlending
});

this.camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);
this.scene = new THREE.Scene();

this.quad = new THREE.Mesh(new THREE.PlaneBufferGeometry(2, 2), null);
this.quad.frustumCulled = false;
this.scene.add(this.quad);
this.createQuadScene();

Object.defineProperties(this,
{
Expand Down
8 changes: 4 additions & 4 deletions source/core/postprocessing/pass/SSAONOHPass.js
Expand Up @@ -117,7 +117,7 @@ function SSAONOHPass()
blendEquationAlpha: THREE.AddEquation
});

var kernelSize = 0;
this._kernelSize = 0;

var self = this;

Expand Down Expand Up @@ -167,11 +167,10 @@ function SSAONOHPass()
*/
kernelSize:
{
get: function(){return kernelSize;},
get: function(){return self._kernelSize;},
set: function(value)
{
kernelSize = value;

self._kernelSize = value;
self.generateSampleKernel();
self.generateRandomKernelRotations();
self.ssaoMaterial.uniforms["tNoise"].value = self.noiseTexture;
Expand Down Expand Up @@ -370,6 +369,7 @@ SSAONOHPass.prototype.toJSON = function(meta)
{
var data = Pass.prototype.toJSON.call(this, meta);

data.kernelSize = this.kernelSize;
data.kernelRadius = this.kernelRadius;
data.minDistance = this.minDistance;
data.maxDistance = this.maxDistance;
Expand Down

0 comments on commit ddc33d5

Please sign in to comment.