Skip to content

Commit ff4cb73

Browse files
committed
Let the RenderPass render to the input buffer.
This behaviour is actually more helpful in some situations.
1 parent 8b3607c commit ff4cb73

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/passes/RenderPass.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export class RenderPass extends Pass {
2525

2626
super("RenderPass", scene, camera, null);
2727

28+
this.needsSwap = false;
29+
2830
/**
2931
* A clear pass.
3032
*
@@ -76,13 +78,13 @@ export class RenderPass extends Pass {
7678
render(renderer, inputBuffer, outputBuffer, delta, stencilTest) {
7779

7880
const scene = this.scene;
79-
const renderTarget = this.renderToScreen ? null : outputBuffer;
81+
const renderTarget = this.renderToScreen ? null : inputBuffer;
8082
const overrideMaterial = scene.overrideMaterial;
8183

8284
if(this.clear) {
8385

8486
this.clearPass.renderToScreen = this.renderToScreen;
85-
this.clearPass.render(renderer, inputBuffer, outputBuffer);
87+
this.clearPass.render(renderer, inputBuffer);
8688

8789
} else if(this.clearDepth) {
8890

0 commit comments

Comments
 (0)