Přeskočit obsah

32 Bit texture support

By default, ZenGin supports only compressed DXT1 and DXT3 textures. zSurface32 patch, created by Gratt improves texture quality by adding proper RGBA8888, BGRA8888, ARGB8888 and ABGR8888 format readout and DirectX 32 Bit surface support in ZenGin1.

To use the patch you must have Union installed. Download the .patch file here, and put it into system\ directory.

Warning

It is advised to use BGRA8888 due to performance reasons, as other color spaces require additional conversion at runtime.

Compilation

ZenGin doesn’t natively support the compilation of such textures. This can only be achieved using external programs. The simplest method to create a texture is by utilizing zTEXiPy.

  1. Open your texture in zTEXiPy2: zTEXiPy's splash dialog
  2. Choose Save TEX as...
  3. In this window: zTEXiPy's saving dialog
    • Uncheck Generate Mipmaps if your texture is meant to be used as UI.
    • Set the Colorspace to BGRA8888 (zEnum:3) or other supported format.
  4. Press Save and check your texture in-game: In-game Example

But why?

This type of texture is compatible with any asset, whether it’s armour or a sword. However, the primary application for such high-quality textures is in user interface elements, which make extensive use of gradients and the alpha channel:

Comparison between BGRA8888 vs DXT3 (Alpha)

This example shows comparison between raw BGRA8888 color space and DXT3 (BC2)3 compression. DXT3 shows noticeable banding throughout entire texture wherever there's alpha channel, while BGRA8888 has smooth gradient transition.

Comparison between BGRA8888 vs DXT1

This example shows comparison between raw BGRA8888 color space and DXT1 (BC1)3 compression. DXT1 shows lossy quantization artifacts, while BGRA8888 has none.

Source comparison files are available here.

The drawback of using these textures is their large size, as they contain uncompressed color data. However, this is a small price to pay for the improved quality of the final product.

Note

This article was originally written by Shoun and published on G2O Docs.


  1. To learn more about ZenGin Textures reference click here

  2. zTEXiPy supports TGA, DDS, PNG and WEBP by default, so make sure it's one of those formats. 

  3. To learn more about DXTn Algorithm click here