3 ms·
Short answer: Not really. Long answer: Sorta, with a lot of overbearing caveats. Normal HTML elements cannot be rendered this way, there's no way to disable A
by jdiff 2y ago
Short answer: Not really.
Long answer: Sorta, with a lot of overbearing caveats.
Normal HTML elements cannot be rendered this way, there's no way to disable AA when drawing and no way to disable bilinear (or similar) filtering when scaling. Things will lose resolution, but they'll blur rather than chunk.
Image elements and canvases CAN be scaled to preserve pixels. Anything you draw to a canvas can be kept chunky, but you'll be writing your own rendering routines because the browser does not know how to lay off the AA.
There's probably some treachery you can pull off through SVG.
- zamadatix 2y agoExample of some SVG treachery (getting an exact retro style this way would be difficult to say the least) https://codesandbox.io/p/sandbox/pixelate-page-demo-dt6w0 https://codesandbox.io/p/sandbox/pixelate-page-demo-dt6w0
- jdiff 2y agoHeads up, Firefox doesn't like SVG filters being applied to the root element, but the body element works just fine. Pretty impressive effect, seems tricky to tame though. Where's this gingham pattern bubble up from?