How-to guides

Prove a fix stayed in its region

Use diff to show exactly which pixels an edit changed.

When polishing a texture, each fix should touch only the region it is meant for. Keep the render from before the fix and compare:

cp out/lower.png before.png
# edit the grid, then:
texturescript grid lower.grid out/lower.png
texturescript diff out/lower.png before.png --sheet diff.png

diff prints a count and a map of the changed pixels:

mismatch 5/256  (missing 0, extra 5, wrong colour 0)
................
................
................
...........XX...
..........XXX...
................

--sheet writes the new texture, the old one and the changed pixels side by side, enlarged.

In a script or a check, add --check to exit with status 1 when any pixel differs, for example to confirm a refactor of a grid changed nothing.

Copyright © 2026