Also pass in drawable to useNearest
This makes the code messier but I'm not sure what else to do since the texture filtering method to be used depends on the drawable's properties (e.g. transform, enabled effects). We still need to pass in the scale separately because in the main rendering path, we multiply it by the screen-space scale factor.
This commit is contained in:
@@ -59,9 +59,9 @@ class SVGSkin extends Skin {
|
||||
return this._svgRenderer.size;
|
||||
}
|
||||
|
||||
useNearest (scale) {
|
||||
useNearest (scale, drawable) {
|
||||
// If the effect bits for mosaic, pixelate, whirl, or fisheye are set, use linear
|
||||
if ((this.enabledEffects & (
|
||||
if ((drawable.enabledEffects & (
|
||||
ShaderManager.EFFECT_INFO.fisheye.mask |
|
||||
ShaderManager.EFFECT_INFO.whirl.mask |
|
||||
ShaderManager.EFFECT_INFO.pixelate.mask |
|
||||
@@ -71,7 +71,7 @@ class SVGSkin extends Skin {
|
||||
}
|
||||
|
||||
// We can't use nearest neighbor unless we are a multiple of 90 rotation
|
||||
if (this._direction % 90 !== 0) {
|
||||
if (drawable._direction % 90 !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user