GO with sprite. Sprite quality while go.set_scale (Solved)

#1

I have a big map in my game. It is a sprite attached to game object. By default scale of this go is set to 0.5. Players can zoom in and out. I’m doing it by changing scale of the go. So value changes from 0.5 to 1.33. As i discovered, sprite quality changes as well, but in some wierd way. On 0.5 scale map looks kind of blurry:
5
on 0.74 it becomes very sharp:


and from 0.91 to 1.3 it looks not so sharp, but still ok:
.

Logically i would expect it to be sharp around 1 and up, and probably lose some quality while downscaling. So what can cause this?

Here is not cropped images:

Open them in a new tab and zoom on continents

1 Like

Zoo Economy (Strategy-puzzle)
#2

You are likely observing mipmaps. You can disable them by using a material without mipmaps set, and if you do that you’ll want to disable mipmap generation potentially. Another option you may prefer the look of is to adjust the mipmap bias so you still use them but favor the higher res versions more. This is done by using a custom fp fragment program.

4 Likes

#3

First of all: What are you working on? It looks fun!

Some thoughts:

5 Likes

#4

Yep. It was them. I disabled mipmaps and now map looks sharp. But i would probably spend later some time adjusting mipmap bias, cause without mipmaps small objects looks ugly. Thanks for your help.

6 Likes

#5

I’ll do a post about the game very soon and maybe a dev diary too)

And it was mipmaps, on building and bundling versions.

4 Likes

#6

Please take a look, it may be useful in your case:
https://agulev.com/en/defold-nekotorye-slozhnosti-i-ih-resheniya/#materials

3 Likes

#7

I will definitely do. Thanks

1 Like