Resized images becomes too blurry, can I change that?


I got this cool effect with a banner where the warning “ASTROIDS!” scroll by when ever astroids closeup. Problem is the image with the text “ASTROIDS!” becomes too blurry so you can barly see it…

I figured I could set the renderer or something to “choose closest pixel” or something but I couldn’t find it.

filter=“true” does not help.

Is there anyway to do this?

A better texture?

Yes I could do that but it would still be a bit blurry…

On textures I do: img.setMagFilter(Texture.MagFilter.Nearest); and I think that these images are also just textures renderd 2d.

Problem is just getting them…

Texture.MagFilter.Bilinear should give better results.

Is it meant to say “Asteroids”? You are consistently mis-spelling it :slight_smile:

1 Like

Yes :stuck_out_tongue:

It’s corrected now, here is the image:

As you can see it’s very small. It’s mainly to make the game look retro but it gets blurry upon resizing…

@Addez said:
but it gets blurry upon resizing..

that kinda makes it more retro...... :D

You should make your texture so that it displays with a 1:1 scale with the most common resolution. this one is kinda small even for a 800 * 480.

The other alternative is to have a set of small and big images and choose the image to display according to the resolution.
Most of the time on android you'll have 800x480 or 1280 x 800 or something like that

The default shaders interpolate between pixels to give you a continuous colour shift as you move across the object. You either need a different shader that will keep the “jump” or a higher res texture containing pixilated text if you want the retro vibe.

(I don’t know if there is a setting for the standard shaders to give the behaviour you want or not)