Skip to content

Commit

Permalink
Fix some additional things needed for dvoje
Browse files Browse the repository at this point in the history
  • Loading branch information
sigvef committed Jul 10, 2019
1 parent a21f110 commit ce9ba52
Show file tree
Hide file tree
Showing 5 changed files with 13,213 additions and 10,417 deletions.
4 changes: 2 additions & 2 deletions nin/dasBoot/FullscreenRenderTargetPool.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class FullscreenRenderTargetPool {
this.renderTargets[this.used] = renderTarget;
}
this.used++;
renderTarget.repeat.set(1, 1);
renderTarget.offset.set(0, 0);
renderTarget.texture.repeat.set(1, 1);
renderTarget.texture.offset.set(0, 0);
return renderTarget;
}

Expand Down
2 changes: 2 additions & 0 deletions nin/dasBoot/RootNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class RootNode extends NIN.Node {
map: A
});
}
renderer.setRenderTarget(null);
renderer.clear();
renderer.render(this.scene, this.camera);

NIN.FullscreenRenderTargetPool.withdrawFullscreenRenderTargets();
Expand Down
5 changes: 4 additions & 1 deletion nin/dasBoot/ShaderNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ class ShaderNode extends NIN.Node {

render(renderer) {
const renderTarget = NIN.FullscreenRenderTargetPool.getFullscreenRenderTarget();
renderer.render(this.scene, this.camera, renderTarget, true);
renderer.setRenderTarget(renderTarget);
renderer.clear();
renderer.render(this.scene, this.camera);
renderer.setRenderTarget(null);
this.outputs.render.setValue(renderTarget.texture);
}
}
Expand Down
5 changes: 4 additions & 1 deletion nin/dasBoot/THREENode.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ class THREENode extends NIN.Node {

render(renderer) {
const renderTarget = NIN.FullscreenRenderTargetPool.getFullscreenRenderTarget();
renderer.render(this.scene, this.camera, renderTarget, true);
renderer.setRenderTarget(renderTarget);
renderer.clear();
renderer.render(this.scene, this.camera);
renderer.setRenderTarget(null);
this.outputs.render.setValue(renderTarget.texture);
}

Expand Down
Loading

0 comments on commit ce9ba52

Please sign in to comment.