Merge pull request #443 from adroitwhiz/effects-nearest

Always use linear interpolation on vector skins with distortion effects applied
This commit is contained in:
DD Liu 2019-09-04 17:19:52 -04:00 committed by GitHub
commit 2d4419c929
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -433,6 +433,16 @@ class Drawable {
return true;
}
// If the effect bits for mosaic, pixelate, whirl, or fisheye are set, use linear
if ((this._effectBits & (
ShaderManager.EFFECT_INFO.fisheye.mask |
ShaderManager.EFFECT_INFO.whirl.mask |
ShaderManager.EFFECT_INFO.pixelate.mask |
ShaderManager.EFFECT_INFO.mosaic.mask
)) !== 0) {
return false;
}
// We can't use nearest neighbor unless we are a multiple of 90 rotation
if (this._direction % 90 !== 0) {
return false;