Skip to content

alex-irt/uPaddingBleed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Adds bleed to tiles in padded unity tilesheets. Unity's texture packer adds padding to textures when packing but leaves this space black and transparent which makes mipmapping the atlas or even using bilinear or trilinear filterint impossible. This script can either repeat each texture in the padding (for tilesheets of repeating tiles) or stretch the edge pixels to fill the padding (for standalone tiles).

##Usage

//Generate your atlas as you would normally
Rect[] rects = atlas.PackTextures(atlasTextures, 32, 8192, false);
//Call bleed edges to fill the padding
uPaddingBleed.BleedEdges(atlas, 32, rects, repeatingTextures: true);

Pass it the texture, the padding amount, some or all of the rects to apply padding fill to and lastly whether or not to repeat the texture or stretch the edges.

Repeat padding:

Repeat padding

Bleed padding:

Repeat padding

About

Fill the padding in unity packed textures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages