elringus/sprite-dicing

Cross-engine tool for lossless compression of sprites with identical regions

Rust

1,539

237 commits

updated Sep 11, 2026

See the code

README

SpriteDicing


crates.io CodeFactor CodeCov


Reuse repeating texture regions

Use SpriteDicing to split a set of sprite textures into units, discard identical ones, bake unique units into atlas textures to then seamlessly reconstruct the original sprites at runtime, without actually keeping original textures in the build.

The solution significantly reduces build size when multiple textures with identical areas are used. Consider a visual novel type of game, where multiple textures per character are used, each portraying different emotion; most of the texture space is occupied with identical data, while only a small area varies:

dicing illustration

These original five textures have total size of 17.5MB. After dicing, the resulting atlas texture will contain only the unique areas of the original textures and consume just 2.4MB, effectively compressing the textures by 86.3%.

🎬 Get Started

https://dicing.elringus.com/guide/getting-started


Sprite Dicing is used in Naninovel: Visual Novel, Dialogue & Cutscene Storytelling Engine. Check it out!

naninovel banner

atlas
cli
gamedev
godot
rust
sprites
tool
unity

elringus/sprite-dicing

Cross-engine tool for lossless compression of sprites with identical regions

Rust

1,539

237 commits

updated Sep 11, 2026

See the code

README

SpriteDicing


crates.io CodeFactor CodeCov


Reuse repeating texture regions

Use SpriteDicing to split a set of sprite textures into units, discard identical ones, bake unique units into atlas textures to then seamlessly reconstruct the original sprites at runtime, without actually keeping original textures in the build.

The solution significantly reduces build size when multiple textures with identical areas are used. Consider a visual novel type of game, where multiple textures per character are used, each portraying different emotion; most of the texture space is occupied with identical data, while only a small area varies:

dicing illustration

These original five textures have total size of 17.5MB. After dicing, the resulting atlas texture will contain only the unique areas of the original textures and consume just 2.4MB, effectively compressing the textures by 86.3%.

🎬 Get Started

https://dicing.elringus.com/guide/getting-started


Sprite Dicing is used in Naninovel: Visual Novel, Dialogue & Cutscene Storytelling Engine. Check it out!

naninovel banner

atlas
cli
gamedev
godot
rust
sprites
tool
unity

Project health

crates.io

Latest release

1.0.0 · Sep 11, 2026

Releases this year

1

Significant stargazers

Hans

180 followers · starred Apr 2025

Ignacio Roldán Etcheverry

216 followers · starred Feb 2022

Trent

127 followers · starred Apr 2024

Slashscreen

38 followers · starred Aug 2023