Unity Sprite Mesh Optimization: Tight vs Full Rect

Polygon mesh sprites are a way to improve rendering performance and increase your frame rate.
In 2D rendering, performance is usually limited either by overdraw (GPU / fill rate) or by vertex processing (CPU). The shape of a sprite mesh directly affects this trade-off.
TexturePacker not only creates optimized sprite meshes but also packs them tightly into a Sprite Atlas.
You'll learn how you can enable polygon packing and make use of it in your Unity project.
TexturePacker has two important features for Unity users:
- Optimized polygon mesh sprites: similar to Unity's Tight Mesh Type but with better optimization
- Polygon packing: to reduce texture memory in your Sprite Atlas
Full Rect vs Tight: Understanding Unity's Mesh Type
In Unity's Sprite import settings, the Mesh Type option controls how the sprite mesh is generated:
- Full Rect: A simple rectangle covering the entire sprite bounds. Fast to render but includes all transparent pixels.
- Tight: A polygon mesh that fits tightly around the opaque pixels, reducing overdraw — but requiring more vertices.
TexturePacker gives you full control over the trade-off between overdraw and vertex count through the Trim mode setting:
| Trim Mode (TexturePacker) | Mesh Type (Unity) | Vertices | Overdraw | Best For |
|---|---|---|---|---|
| None | Full Rect | 4 | High | Simple sprites without transparency |
| Crop, keep position | Full Rect | 4 | Medium | Sprites with transparent borders, CPU-constrained platforms |
| Polygon | Tight polygon | Many | Low | Complex shapes, GPU-constrained platforms |
Crop, keep position is a good default for many projects: it removes transparent borders while keeping a simple 4-vertex mesh. The pivot point is automatically adjusted to compensate — keeping your animations smooth.
Despite the visual trimming, this still produces a Full Rect mesh in Unity, not a Tight mesh.
For maximum performance, Polygon mode creates tight-fitting meshes around your sprites. Unity's built-in Tight mesh type does the same, but offers no control over the optimization. TexturePacker gives you direct control through the Tracer Tolerance slider:
- Lower values (50-100): Tighter fit, less overdraw, more vertices
- Higher values (200+): Fewer vertices, more overdraw
- Recommended default (100-200): Good balance for most games
Here's how TexturePacker's optimized meshes compare to Unity's built-in Tight mesh:
TexturePacker typically reduces triangle count by 30-50% compared to Unity's built-in mesh generation while maintaining a tight fit.
To enable polygon meshes, set Trim mode to Polygon in TexturePacker. The TexturePacker Importer automatically applies the optimized meshes to your sprites in Unity.
Use the visual feedback to find the right balance: if you see significant transparent areas inside the mesh, lower the tolerance. If your game is CPU-bound, increase it to reduce vertex count.
Polygon packing
Set TexturePacker's Algorithm to Polygon to pack sprites based on their actual outlines rather than bounding boxes. This takes longer than MaxRects but can significantly reduce atlas size — especially for irregularly shaped sprites.
| Algorithm | Recommended Trim Mode | Notes |
|---|---|---|
| Polygon | Polygon | Works with Crop - but usually does not pack better than MaxRects |
| MaxRects | Polygon or Crop | Polygon for less overdraw, Crop for fewer vertices |
Notice how sprites interlock based on their actual shape rather than rectangular bounds. Packing more sprites into a single sheet reduces the total number of sprite sheets, which in turn reduces texture switches at runtime:
The TexturePacker Importer applies the data generated by TexturePacker during the import process only. It reads polygon outlines, mesh vertices, and pivot data from the .tpsheet file and assigns them to the corresponding Unity sprites. No importer code runs at runtime or on the target device.
When polygon meshes are not the right choice
Polygon meshes are not always beneficial. Very small sprites, simple rectangular artwork, or large numbers of short-lived particles may perform better with Full Rect meshes due to lower vertex overhead.
Summary
To optimize sprite rendering in Unity with TexturePacker:
- Set Trim mode to Polygon for optimized meshes
- Use Tracer Tolerance 100-200 as a starting point
- Set Algorithm to Polygon for tighter atlas packing
- Import with the free TexturePacker Importer
This gives you 30-50% fewer triangles than Unity's built-in Tight mesh, full control over the vertex/overdraw trade-off, and more efficient atlas packing.
TexturePacker runs independently of Unity and can be used as a preprocessing step. Optimized sprite sheets can be checked into version control, reducing import times and build complexity. This workflow also allows artists to deliver ready-to-use sprite atlases instead of individual sprite files.