Skip to content

Commit 7457cc6

Browse files
committed
Fix phaserjs#2320: properly size filter texture and viewport
1 parent 12c529f commit 7457cc6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/pixi/renderers/webgl/utils/WebGLFilterManager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ PIXI.WebGLFilterManager.prototype.pushFilter = function(filterBlock)
9393
var texture = this.texturePool.pop();
9494
if(!texture)
9595
{
96-
texture = new PIXI.FilterTexture(this.gl, this.width, this.height);
96+
texture = new PIXI.FilterTexture(this.gl, this.width * this.renderSession.resolution, this.height * this.renderSession.resolution);
9797
}
9898
else
9999
{
100-
texture.resize(this.width, this.height);
100+
texture.resize(this.width * this.renderSession.resolution, this.height * this.renderSession.resolution);
101101
}
102102

103103
gl.bindTexture(gl.TEXTURE_2D, texture.texture);
@@ -120,7 +120,7 @@ PIXI.WebGLFilterManager.prototype.pushFilter = function(filterBlock)
120120
gl.bindFramebuffer(gl.FRAMEBUFFER, texture.frameBuffer);
121121

122122
// set view port
123-
gl.viewport(0, 0, filterArea.width, filterArea.height);
123+
gl.viewport(0, 0, filterArea.width * this.renderSession.resolution, filterArea.height * this.renderSession.resolution);
124124

125125
projection.x = filterArea.width/2;
126126
projection.y = -filterArea.height/2;

0 commit comments

Comments
 (0)