Hi,
basically when i go in full screen mode i want the game not to be smoothed but instead i want the pixels to be "sharp". I know it should have something to do with the interpolation mode, which has to be set to NEAREST instead of LINEAR. I looked around in the internet on how to do that, expecially in PIXI forums but i had no luck so far. I tried to type this line andto put it i na plugin but it didnt' work.
PIXI.scaleModes.DEFAULT = PIXI.scaleModes.NEAREST;
Any ideas?
After some long hours tring to put every scale mode to PIXI.scaleModes.NEAREST withour results, i thought i could be the html side of rpg maker that had the last word on how the game is rendered. So after some tries i found a way to modify the css style by code, basically i inserted a line in "Scene_Boot.prototype.start" but you can put it elsewhere it just has to be called after the graphics are initalized. This is the line
Graphics._canvas.style.imageRendering = "pixelated";
You can revert back to a linear scaling mode using this line
Graphics._canvas.style.imageRendering = "pixelated";
Graphics._canvas.style.imageRendering = "auto";
You can also put it as an ingame option without problem i guess. I don't know though if this method will work on android or iOs too
Hi
Could You write more about this interpolation? I dont know where to put that code line you gaved in the post?
Graphics._canvas.style.imageRendering = "auto";
In what file and where exactly i need to put this line?
I also need sharp edges graphics.
Thanks for help!
i think you can put it where you want it like you can make a plugin file just with that command but i'm not sure, i dont' know if the game has to do at elast 1 cycle before you can call that. In any case you can put it in Scene_Boot i think, something along this way
Scene_Boot.prototype.start = function() {
Scene_Base.prototype.start.call(this);
SoundManager.preloadImportantSounds();
if (DataManager.isBattleTest()) {
DataManager.setupBattleTest();
SceneManager.goto(Scene_Battle);
} else if (DataManager.isEventTest()) {
DataManager.setupEventTest();
SceneManager.goto(Scene_Map);
} else {
this.checkPlayerLocation();
DataManager.setupNewGame();
SceneManager.goto(Scene_Title);
Window_TitleCommand.initCommandPosition();
}
this.updateDocumentTitle();
Graphics._canvas.style.imageRendering = "pixelated"; // <------------- ADDED HERE
};
I didnt test it but it should work.
In any case if you want you can call this line through the editor script call, so you can put in in a common event.
At the moment i have a "plugin" of my own that holds like a initialization call and i put it there
Yeah man! You are genious 🙂 Thanks a laot, it worked!