jpenilla / squaremap

squaremap is a minimalistic and lightweight world map viewer for Minecraft servers, using the vanilla map rendering style
https://modrinth.com/plugin/squaremap
Other
324 stars 36 forks source link

No option to disable resampling or set to nearest neighbor #75

Open etzabo opened 2 years ago

etzabo commented 2 years ago

I really want a nice, crisp view when zooming in to my map. The current upscaling of images really makes it feel awkward, like it's adding complexity to something that doesn't need it. Disabling resampling could really add to the aesthetic, looking more like vanilla maps.

jpenilla commented 2 years ago

I'm struggling to understand what you're talking about, but assuming you mean when zooming out and not in, then the method used is the same as vanilla. There's other methods that could be applied that would look different, however again the current zoom out method is the vanilla one, and when fully zoomed in each block is one pixel, no "resampling" or similar is applied, so I am still confused about what you mean.

etzabo commented 2 years ago

I'm struggling to understand what you're talking about, but assuming you mean when zooming out and not in, then the method used is the same as vanilla. There's other methods that could be applied that would look different, however again the current zoom out method is the vanilla one, and when fully zoomed in each block is one pixel, no "resampling" or similar is applied, so I am still confused about what you mean.

Screenshot 2022-08-30 at 7 56 18 AM

In this image, you can see the blur created between two pixels in each image, which is absent between tiles. This creates a "crease" in the middle, making the images together look awkward, and creating blur in something that shouldn't have it. I'm pretty sure there's systems that could allow you to disable this automatic resampling done by browsers using something in HTML, similar to how pixel art is made to look normal on websites even in low resolution.

In short, I understand there's no resampling. I know each block is represented as a single pixel on the tile image, but browsers automatically resample images and make them look awkward.

jpenilla commented 2 years ago

What browser are you using? I can't reproduce anything similar looking on Firefox or Chrome, and the CSS is already set to use "pixelated"/not resampled rendering: https://github.com/jpenilla/squaremap/blob/master/common/src/main/resources/web/css/styles.css#L20-L21