You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So Canvas 2d has support for .imageSmoothingEnabled = false, however in WebGL if we want nearest neighbor scaling we have to resort to internal WebGL functionality to accomplish it.
Chrome introduces a nice alternative solution to it, the CSS property image-rendering:pixelated.
It would be dope if we could apply this CSS prop to the canvas element before getting the context (at least) and have it apply to CSS transforms of the canvas element appropriately.
There are other values that can be applied to the image-rendering property so here's some info on the other acceptable values:
So Canvas 2d has support for
.imageSmoothingEnabled = false
, however in WebGL if we want nearest neighbor scaling we have to resort to internal WebGL functionality to accomplish it.Chrome introduces a nice alternative solution to it, the CSS property
image-rendering:pixelated
.It would be dope if we could apply this CSS prop to the canvas element before getting the context (at least) and have it apply to CSS transforms of the canvas element appropriately.
There are other values that can be applied to the
image-rendering
property so here's some info on the other acceptable values:https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering
The text was updated successfully, but these errors were encountered: