What is "extrude border" algorithm

hello.

To describe my problem. let me show my sprites
straight:, internal_corner:, external_corner:

I connect these sprites with each others and doing curved border of my board

So extrude border in atlas settings works well for straight line and internal_corners because they connect directly with another sprites using sprite edges.

Problem happens with external corner, because internal angle connected with another sprite. and as i understand extruding works only by perimeter of the sprite.

So what i think is that for this internal corner of the external_corner sprite i need to make extruding manually in photoshop. These sprites is semitransparent. so i need to know how to add additional pixels. sims like i need to use the same color, but with transparency - i don’t know. maybe i need to divide opacity by 2 every adjacent pixel.

something like this?

Thanks.

First to answer your question, here’s a part of our documentation:

The value specifies how many times the edge pixels should be automatically replicated in the final texture used in when the game is run.

For your problem, I’d create the sprites differently, so that they all have the same dimensions, and have their edge pixels at the actual edge, like this:

Edit: This is related to the common term “Slice 9”, which you can read about here. And although that example is about our gui ,which has support for that, the same layout of your texture applies.

unfortunately it’s not on gui layer. I thought to find something more about how “replication” works.

Probably you right, I think i can split corner sprite it will works right now. probably it would be easiest than to play in photoshop.

ups1: Changed sprites as you advised.

1 Like

To clarify, I did not mean you should use gui, I simply meant that one has to do the slice 9 logic yourself, thus having the texture set up in the same manner.