how do i turn off antialiasing?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
fixylol
Prole
Posts: 21
Joined: Thu Feb 25, 2016 2:16 am

how do i turn off antialiasing?

Post by fixylol »

i'm making a game with low resolution graphics but the graphics are all blurry
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: how do i turn off antialiasing?

Post by Nixola »

Look at [wiki](Image):setFilter[/wiki]; set the filter to "nearest" for every image, right after you load them, if you're drawing them directly.
A better way would probably be this though: create a small [wiki]canvas[/wiki] (something like 320x240, depending on the resolution/aspect ratio you want), set its filter to nearest, draw everything there and then draw and scale the canvas itself.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
pedrosgali
Party member
Posts: 107
Joined: Wed Oct 15, 2014 5:00 pm
Location: Yorkshire, England

Re: how do i turn off antialiasing?

Post by pedrosgali »

Think you can set "nearest" as default, love.graphics.setDefaultFilter("nearest", "nearest", 1) in love.load.

Code: Select all

if not wearTheseGlasses() then
  chewing_on_trashcan = true
end
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: how do i turn off antialiasing?

Post by Nixola »

Oh yeah, you definitely can, I forgot about that. Good catch!
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
fixylol
Prole
Posts: 21
Joined: Thu Feb 25, 2016 2:16 am

Re: how do i turn off antialiasing?

Post by fixylol »

is it possible to turn it off on text?
User avatar
slime
Solid Snayke
Posts: 3144
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: how do i turn off antialiasing?

Post by slime »

Yep, [wiki]Font:setFilter[/wiki] (and Fonts are affected by setDefaultFilter as well).
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Odod5000 and 5 guests