Editor overview

SDFImporter window was deprecated, and now all import settings is displayed in texture inspector.

Untitled


<aside> 💡 This is done by TextureImporterEditor override, if you have other custom editor for TextureImporter it might take control, in this case import settings will be displayed in header)

</aside>

Untitled


Buttons

There is additional controls in SDF import settings section.

  1. Plus button is a shortcut to create SDFAsset, main asset of Starting Decoupled Pipeline

    Untitled

  2. Dropdown button shows what SDFAsset’s in project using this texture

    Untitled

Import Settings

Second section is Import Settings, it has all the SDF Import settings.

Generate SDF

What it does is pretty self-explanatory, if enabled SDF Texture will be generated and SDFImage component can display proper outline, without it will act almost as built-in Image.

Border Offset

Untitled

Default value of 64 determines how much pixels is added to SDF texture at each edge. Since distance field might expand over original texture edges we need to add some additional pixels to it. Value of 64 okay resolution for 512x512 sprite resolution. This value is adapted to account for texture compression and resolution scale so the final number of pixels added is different.

Untitled

If  set to 0 we can see distinct edge on SDF texture, meaning some of SDF pixels is lost. On the final image artifacts will look like that.

If Border Offset set to 0 we can see distinct edge on SDF texture, meaning some of SDF pixels is lost. On the final image artifacts will look like that.

And that is how proper sdf texture with border offset looks like

And that is how proper sdf texture with border offset looks like

If you want border offset can be added to the source texture, but usually it's easier to just use Border Offset