Is it possible to scale images without it getting blury?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Niclasa
Prole
Posts: 3
Joined: Thu Sep 28, 2017 11:42 am

Is it possible to scale images without it getting blury?

Post 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:
MrFariator
Party member
Posts: 510
Joined: Wed Oct 05, 2016 11:53 am

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

Post 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.
Niclasa
Prole
Posts: 3
Joined: Thu Sep 28, 2017 11:42 am

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

Post 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 !!
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 27 guests