Black CraftDev

Docs/Textures

Texture Compare

A/B two textures, or trial a format against the original, with a difference heatmap, channel isolate and the memory each side costs.

EditionLite and ProMenuTools›BlackCraft›Hexbench›Textures›Texture CompareClassTextureCompareWindow

Tells you whether a smaller texture looks any different from the original. Reach for it after the Texture Converter, the Channel Packer or a Texture Budget fix, once you have saved memory and want to know what it cost in quality.

Open it with Tools›BlackCraft›Hexbench›Textures›Texture Compare, or right-click one or two textures in the Project window and choose BlackCraft > Compare Textures.

Modes

A/B compares two textures you choose, for instance an original and its converted copy, or a source and the packed map made from it. A is the reference and B the candidate, so the original belongs in A. If you got them the wrong way round, Swap A and B is in the three-dot menu.

Format Trial compares a texture with itself encoded in a format you pick, using the current import as the reference. The encode happens in memory, and nothing is imported or written to disk.

In A/B, the panes, readout and memory rows are labelled A and B. In a trial they say Source and the format name.

Views

ViewWhat it shows
PairSide by side, sharing zoom and pan
WipeOne over the other, split by a handle
FlipOne at a time, swapped with X
DiffThe difference, amplified

Scroll zooms, dragging pans and double-clicking fits. Channel restricts the panes, heatmap and numbers to one channel, which is how you check alpha for the damage DXT1 and ETC2\_RGBA1 can do.

Reading the difference

A good encode shifts texels by a code or two, so turn up Amplify until you can see structure. Even, noisy speckle means the format is behaving normally. Banding, blocky alpha edges or a bright patch over one feature mean it is failing on this particular texture.

Ramp chooses how the difference is drawn. Heat and Grey show magnitude. Signed shows direction, with red for brighter and blue for darker, which catches a shift across the whole image. With all channels active, Signed follows whichever channel moved most, so a loss confined to alpha still shows up. The ramp is drawn in the Diff view in either mode, and changing Ramp or Amplify switches the stage to that view.

Reading the numbers

PSNR is the main figure. Above 45 dB nobody will see the difference, and below 30 dB everyone will. Peak error is the worst single texel in codes out of 255, and Mean error is the average over every sample in the active channels. Differing gives the share of texels that moved by more than Visible Above, which is worth checking when the peak looks alarming. Per channel shows where the error went.

The verdict

The pill grades the right-hand side against the reference. It reads Identical, or No visible difference when no texel moved past Visible Above, and otherwise grades by PSNR from Very close down to Heavy loss. In A/B, if B uses more memory than A, the wording changes from loss to difference, because B is then probably the original. When B is smaller than the measured size, A is also shrunk to B's size and compared there; if B is close to A at that size, the pill reads Lower resolution and the advice puts the gap down to the size change.

The line below the pill weighs quality against memory and suggests what to do. In A/B it recommends B when B matches A and saves memory, and A when B saves nothing or loses too much; if B costs more and differs heavily, it suggests swapping, since the original is likely in B. In a Format Trial it rates the format acceptable, borderline or not acceptable for this texture and says what to try next, either a better format this GPU can encode or a larger Max Size if the trial was capped. When most of the error is in one channel, the line names it, for example alpha that DXT1 does not store.

Memory

Below the numbers are the runtime memory of each side and the difference between them. This is Unity's own runtime estimate, the same one Texture Budget ranks by, so it includes format, size and mip chain as they will ship. Halving memory at 55 dB costs nothing visible. Saving nothing at 28 dB is a bad trade.

Details

The comparison uses the texture as imported, so with a 512 max size everything happens at 512.

Only formats this GPU can sample are offered. On desktop that usually leaves out ASTC and ETC, and HDR formats are not offered at all.

Colour space is accounted for, so the heatmap shows compression error and not the sRGB curve.

Normal maps are read the way a shader reads them. X and y are unpacked from the importer's swizzle (DXT5nm keeps x in alpha) and z is rebuilt from them. That lets a normal map be compared correctly against a plain RGB copy, and a trial encodes it in the layout the importer would use. With XYZ normal encoding, the mobile default, the stored RGB is compared as is.

Working Size caps the resolution that gets measured so the sliders stay responsive. It has no effect on the encode. Mipmaps adds the mip chain to the memory figure, while error is measured on the top level only.

Each texture is read once per import. Changing a trial setting re-encodes, and Compare re-reads both textures. View, channel and difference controls redraw from pixels already in memory.

comparediffcompressionformatqualitypsnrheatmapab