Skip to content

Commit d87cf4e

Browse files
committed
Always pop and reset!
1 parent d07b2fc commit d87cf4e

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/renderer/webgl/pipelines/PostFXPipeline.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,10 @@ var PostFXPipeline = new Class({
265265
{
266266
this.bind(currentShader);
267267

268-
if (this.currentTarget)
269-
{
270-
// Pop out this pipelines renderTarget
271-
this.renderer.popFramebuffer();
272-
}
268+
this.set1i('uMainSampler', 0);
269+
270+
// Pop out this pipelines renderTarget
271+
this.renderer.popFramebuffer();
273272

274273
var gl = this.gl;
275274

@@ -279,7 +278,7 @@ var PostFXPipeline = new Class({
279278
gl.bufferData(gl.ARRAY_BUFFER, this.vertexData, gl.STATIC_DRAW);
280279
gl.drawArrays(gl.TRIANGLES, 0, 6);
281280

282-
gl.bindTexture(gl.TEXTURE_2D, null);
281+
this.renderer.resetTextures();
283282
}
284283

285284
});

0 commit comments

Comments
 (0)