I've been trying to make a 16-bit styled game with small sprites, but when I try to scale them, I just get a heavily blurred image instead.
Is there any way to get rid of this effect?
Removing blur on scaled sprites
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Removing blur on scaled sprites
- Attachments
-
- BadBlur.love
- (647 Bytes) Downloaded 86 times
Re: Removing blur on scaled sprites
Image:setFilter("nearest", "nearest")
You could also use love.graphics.setDefaultFilter() before loading the images so you don't have to set the filter for each.
or
You could also use love.graphics.setDefaultFilter() before loading the images so you don't have to set the filter for each.
Code: Select all
image = love.graphics.newImage("Image.png")
image:setFilter("nearest", "nearest")
Code: Select all
love.graphics.setDefaultFilter("nearest", "nearest")
image = love.graphics.newImage("Image.png")
image2 = love.graphics.newImage("Image2.png")
Re: Removing blur on scaled sprites
Ah. Thanks man.veethree wrote:Image:setFilter("nearest", "nearest")
You could also use love.graphics.setDefaultFilter() before loading the images so you don't have to set the filter for each.
orCode: Select all
image = love.graphics.newImage("Image.png") image:setFilter("nearest", "nearest")
Code: Select all
love.graphics.setDefaultFilter("nearest", "nearest") image = love.graphics.newImage("Image.png") image2 = love.graphics.newImage("Image2.png")
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests