Need a better way of drawing pixellated polygons

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.
User avatar
Bobble68
Party member
Posts: 162
Joined: Wed Nov 30, 2022 9:16 pm
Contact:

Re: Need a better way of drawing pixellated polygons

Post by Bobble68 »

pgimeno wrote: Sat May 20, 2023 3:04 pm
pgimeno wrote: Fri May 19, 2023 9:13 pm A mesh made of long rectangles with one rectangle per pixel row?
Here's a proof of concept for that. I took the liberty of extracting stone.png from your game for this demo, I hope you don't mind.

As I commented in the other thread, the texture is first drawn to a canvas in nearest neighbour mode with a floor(magnification factor) zoom factor, then the canvas interpolation mode is set to linear filtering. That canvas is then used as the mesh texture.
I like this approach! You mind if I see if I can implement it in my game?
Dragon
User avatar
pgimeno
Party member
Posts: 3691
Joined: Sun Oct 18, 2015 2:58 pm

Re: Need a better way of drawing pixellated polygons

Post by pgimeno »

Sure, go ahead.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 10 guests