Page 2 of 2

Re: Need a better way of drawing pixellated polygons

Posted: Sat May 20, 2023 7:18 pm
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?

Re: Need a better way of drawing pixellated polygons

Posted: Sat May 20, 2023 7:23 pm
by pgimeno
Sure, go ahead.