Merge pull request #268 from paulkaplan/fix-blurry-fullscreen

Scale the drawable scale by the ratio of pixel size to native size.
This commit is contained in:
Paul Kaplan 2018-05-02 07:43:07 -04:00 committed by GitHub
commit 0b849296c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1215,7 +1215,11 @@ class RenderWebGL extends EventEmitter {
// the ignoreVisibility flag is used (e.g. for stamping or touchingColor).
if (!drawable.getVisible() && !opts.ignoreVisibility) continue;
const drawableScale = drawable.scale;
// Combine drawable scale with the native vs. backing pixel ratio
const drawableScale = [
drawable.scale[0] * this._gl.canvas.width / this._nativeSize[0],
drawable.scale[1] * this._gl.canvas.height / this._nativeSize[1]
];
// If the skin or texture isn't ready yet, skip it.
if (!drawable.skin || !drawable.skin.getTexture(drawableScale)) continue;