From a21f110e17ed81cc53645adc0e08ec9fb5efb6bf Mon Sep 17 00:00:00 2001 From: Sigve Sebastian Farstad Date: Sat, 20 Apr 2019 23:58:06 +0200 Subject: [PATCH] Reset more when using RT pool 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. --- nin/dasBoot/FullscreenRenderTargetPool.js | 2 ++ nin/dasBoot/NodeManager.js | 2 +- nin/dasBoot/RootNode.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nin/dasBoot/FullscreenRenderTargetPool.js b/nin/dasBoot/FullscreenRenderTargetPool.js index 238b4bb..386cd6f 100644 --- a/nin/dasBoot/FullscreenRenderTargetPool.js +++ b/nin/dasBoot/FullscreenRenderTargetPool.js @@ -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; } diff --git a/nin/dasBoot/NodeManager.js b/nin/dasBoot/NodeManager.js index f3f7ddb..9cc10b6 100644 --- a/nin/dasBoot/NodeManager.js +++ b/nin/dasBoot/NodeManager.js @@ -57,7 +57,7 @@ class NodeManager { resize() { for(var key in this.nodes) { - this.nodes[key].resize(); + this.nodes[key].resize(); } } diff --git a/nin/dasBoot/RootNode.js b/nin/dasBoot/RootNode.js index a38c452..aec3b06 100644 --- a/nin/dasBoot/RootNode.js +++ b/nin/dasBoot/RootNode.js @@ -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);