Page 1 of 1

Is it possible to scale images without it getting blury?

Posted: Sat Feb 24, 2018 9:57 pm
by Niclasa
My question is "Is it possible to scale images without it getting blury?" And that is what i want to know! I want to know if there is a trick a workaround or whaterverthef so that doesnt happen? I tried scaling it up in intervals of integers but that didnt seem to work either... Im going for an undertale-ish apperance (I know there are other games that look like this but im going to assume that most people here are familiar with undertale) and I thougth that this is an asthetic that most other indie devs on this forum also wanted to explore this artstyle so i was shocked that noone asked this before (I think) :oops:
soooooooo.......Yeah!



(thank in advanced) :nyu:

Re: Is it possible to scale images without it getting blury?

Posted: Sat Feb 24, 2018 10:36 pm
by MrFariator
By default love uses linear filter mode when scaling images up or down, which results in a blurry image. You can change this behavior simply by setting the default like so

Code: Select all

love.graphics.setDefaultFilter("nearest", "nearest",1)
After setting the mode to "nearest" you can keep pixels crispy, so long you scale up in integer increments.

You can also set it per-image basis with Texture:setFilter.

Re: Is it possible to scale images without it getting blury?

Posted: Sat Feb 24, 2018 10:47 pm
by Niclasa
MrFariator wrote: Sat Feb 24, 2018 10:36 pm By default love uses linear filter mode when scaling images up or down, which results in a blurry image. You can change this behavior simply by setting the default like so

Code: Select all

love.graphics.setDefaultFilter("nearest", "nearest",1)
After setting the mode to "nearest" you can keep pixels crispy, so long you scale up in integer increments.

You can also set it per-image basis with Texture:setFilter.
Thank you very much !!