Page 1 of 1

Something similar to 'setFilter' using push library

Posted: Fri Aug 06, 2021 2:50 am
by buby1
Am currently making my first game right now. I wanted to scale up my game because I am using pixel graphics, and the window is quite small when it's 256 x 256. I know when using

Code: Select all

love.graphics.scale()
to scale your game you can use something like

Code: Select all

sprites.player:setFilter('nearest', 'nearest')
in order to make the image not blurry when upscaled. However, I was just wondering if there was a way to make images upscale without being blurry using the push library.https://github.com/Ulydev/push Currently, my push code looks like this:

Code: Select all

push = require 'libraries/push/push'
push:setupScreen(256, 256, 768, 768, {fullscreen = false})

function love.draw()
	push:start()
		--draw character
	push:finish()
end

Re: Something similar to 'setFilter' using push library

Posted: Fri Aug 06, 2021 1:01 pm
by ReFreezed
The push library doesn't seem to change the filtering for any images. Just call setFilter() on images when you load them as usual, or call love.graphics.setDefaultFilter("nearest","nearest") before loading any images.

Re: Something similar to 'setFilter' using push library

Posted: Fri Aug 06, 2021 7:00 pm
by buby1
Thank you. For some reason using setFilter() didn't work for me with push, but setting the default filter at the top of my program worked.

Re: Something similar to 'setFilter' using push library

Posted: Fri Aug 06, 2021 10:14 pm
by pgimeno
Push uses a canvas internally. You'd have to set that canvas' filter to make it work without setDefaultFilter.