Use bilinear filtering except when we shouldn't
Use bilinear filtering unless the Drawable is angled by a multiple of 90 degrees and is either a raster image (like a BitmapSkin) or is around its native resoluion. This makes both bitmaps and vectors look better in most cases. This is roughly the same logic that Scratch 2.0 used; we may want to tweak it over time to see if we can make it even better.
This commit is contained in:
@@ -81,10 +81,9 @@ class SVGSkin extends Skin {
|
||||
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._svgRenderer.canvas);
|
||||
this._silhouette.update(this._svgRenderer.canvas);
|
||||
} else {
|
||||
// TODO: mipmaps?
|
||||
const textureOptions = {
|
||||
auto: true,
|
||||
mag: gl.NEAREST,
|
||||
min: gl.NEAREST, /** @todo mipmaps, linear (except pixelate) */
|
||||
wrap: gl.CLAMP_TO_EDGE,
|
||||
src: this._svgRenderer.canvas
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user