Delta

This shader shows helpes you to visualize the loss of detail to a texture from any particular compression option, in order to allow you to select the option that best matches your priorities for any given texture.

It does this by subtracting a compressed texture from an uncompressed version of the same texture, taking the absolute value of the difference, magnifying it by a specified amount to help highlight the difference.

If there's no differences, the result would be black. More color means more difference. If magnification is set to 1, subtle differences may be harder to spot, but if magnification is larger, the perceptual importance of differences will tend to be overstated.



The same object, compressed as RGB16, DXT1, PVRTC 2BPP RGB, and PVRTC 4BPP RGB with magnification turned up to 10x.



To use this, find a texture you're interested in. Make a duplicate of it. Change the texture compression settings of one to be either RGB24 or ARGB32 if it has an alpha channel. Change the other to be compressed. Make sure mip-map settings, filtering, and wrap-mode are identical. Apply each image to one of the slots provided by the shader, and apply the material to a plane mesh. Set the view to orthographic projection. Zoom in/out to see how mip-levels fare.

To view changes in the alpha channel, change the scene view from color to alpha.

The slider labeled "White, Red, Green, Blue, Alpha" will let you visualize the error on a per-channel basis, which can be useful since human color discrimination is less precise for some colors (red, blue) than others (green). High-intensity spots in the green channel are thus worse than such spots in the red channel, which is worse than the blue channel.

NOTE: By default, Unity will NOT compress the texture immediately and you'll just see black. In preferences, set "Compress Textures when Importing", and ensure that you do NOT see "(not compressed yet)" on the Format line when inspecting the texture. If you don't want to enable this option, perform a build after setting compression options, to actually compress the textures.