Forcing the game to use nearest-neighbor filtering

So basically I'm severely abusing the tile size and screen resolution plugins to make a retro-ish pixel art game. It worked about as well as I thought (terribly at first). So I made my own poorly made plugin to change the various windows, text padding, and other UI elements to look more nicely proportioned at that low of a resolution. I even figured out how to change the default font to a pixel font with no outlines or blurring (as long as you run it in firefox I guess) or anything like that. I just have one major problem: when the game window is changed from its original size or you put it in full screen or something like that, even if it's set to a multiple of the original size, it looks blurred. I've tried messing around in rpg_core.js and pixi.js to see if I could force it to use nearest-neighbor, rather than linear filtering, but no dice. Any ideas?
This might be your issue.
OK, I figured it out... sort of. The bitmap fix seems like it would help prevent things being blurred because they're being rendered between pixels (which is a problem I didn't even think of, thank you!), but wouldn't actually affect the actual game itself being blurred. The fix I found is to add this to the index.html:


<style type="text/css">
CANVAS{image-rendering: pixelated;}
</style>


Which fixes it when running from the editor, but has no effect when running in firefox. For some reason I have a feeling this has something to do with the fact that pixi.js seems to have 2 ways of rendering. One involving a "canvas", the other involving something called "webgl". (Correct me if I'm wrong about this by the way.)


Any way to fix for firefox? (or am I just going to have to deal with it because javascript is apparently wildly inconsistent across different implementations)

Original thread: https://forums.rpgmakerweb.com/threads/forcing-the-game-to-use-nearest-neighbor-filtering.55544/