Unexpected outline around the stretched tiles (SOLVED)

Hi again!

I faced with one unpleasant effect: I have a background, filled with tiles. When the game window size is set to 1:1 then everything looks as expected. But if I change window size (or run my app on android with a different screen resolution so the screen is being stretched) then I see unwanted outlines around the tiles:

I’m 100% confident that this tile is completely filled with one color and does not have an outline.
Is there any way to avoid this?

Thanks!

Hi!

Could you try changing the “extrude borders” to 1 on the tile source? :+1:

Here is a post from a genius going into depth about common texture problems in Defold: Texture Management in Defold

2 Likes

Many thanks sven!
This works for me

1 Like

Should borders automatically be extruded 1 or 2 pixels instead of the standard one?

No, I don’t thinks so. It’s not always that you want to extrude borders, and in some cases it could be what would push an atlas up to the next size. It’s better if it’s a user option. Also, you may not always want to have borders extruded 1 pixel. Sometimes you want 2 or more (depending on how much you scale graphics).

3 Likes

Good to know. Then if I’m designing my tile source image as 1024x1024 with 256x256 tiles (4 tiles width), then by setting extrude borders =1 the engine will create another atlas bigger than 1024x1024?

I’m scaling down everthing x0.5 for high-dpi support, then should I extrude the pixels by 2 instead of 1?

Yes, that is correct.

I believe that you need a higher extrude value if you scale up (ie more than 1.0).

2 Likes

Thank you!

1 Like