Skip to content

Commit

Permalink
Reset more when using RT pool
Browse files Browse the repository at this point in the history
Rendertargets from the rendertarget pool don't reset everything
inbetween use. Maybe we want to reset everything really, but right now
we need these specific things to be reset for the `si` demo, so this is
a good place to start.
  • Loading branch information
sigvef committed Apr 20, 2019
1 parent 1868fbd commit a21f110
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions nin/dasBoot/FullscreenRenderTargetPool.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class FullscreenRenderTargetPool {
this.renderTargets[this.used] = renderTarget;
}
this.used++;
renderTarget.repeat.set(1, 1);
renderTarget.offset.set(0, 0);
return renderTarget;
}

Expand Down
2 changes: 1 addition & 1 deletion nin/dasBoot/NodeManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class NodeManager {

resize() {
for(var key in this.nodes) {
this.nodes[key].resize();
this.nodes[key].resize();
}
}

Expand Down
2 changes: 1 addition & 1 deletion nin/dasBoot/RootNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class RootNode extends NIN.Node {
inputs: {screen: new NIN.TextureInput()}
});

this.camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);
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.scene.add(this.quad);
Expand Down

0 comments on commit a21f110

Please sign in to comment.