This document originated on GitLab

# Adobe DDS plug-in

This is a plug-in for reading and writing the DirectDraw Surface (DDS) format in Adobe After Effects and Photoshop. DDS uses compression formats that can be decompressed in a GPU, so the format is commonly used to store textures. It also supports other relevant features such as mipmaps.

## Author

Written by Brendan Bolles of fnord software. Made possible by the sponsorship of Walter Soyka of Keen Live and Cameron Yeary of UVLD.

## System Requirements

Photoshop CS6 or later, After Effects CS6 or later. Mac OS X 10.9 or later, Windows 7 or later. May work in older configurations as well, give it a try.

## Installation

Manually copy the plug-in to your host application's plug-ins folder. Double-clicking the plug-in file will not install it.

## Compression Formats

Most DDS files use one of the S3 Texture Compression formats, commonly known as DXTn. Support for ATI's 3Dc/DXN format is also provided, as well as the option to store images uncompressed.

Format | Channels | Alpha Type | Premultiplied
DXT1 | RGB | None | N/A
DXT1A | RGBA | 1-bit | N/A
DXT2 | RGBA | Explicit | Yes
DXT3 | RGBA | Explicit | No
DXT4 | RGBA | Interpolated | Yes
DXT5 | RGBA | Interpolated | No
DXT5A | A | Alpha as Luma | N/A
3Dc | XY | None | N/A
DXN | YX | None | N/A
Uncompressed | RGB(A) | Uncompressed | Undefined

The difference between the DXTn formats is how they handle alpha. DXT2/3 are better suited for alpha channels with hard edges, while DXT4/5 are better suited for soft-edged alphas. DXT 2 & 4 expect the RGB to be premultiplied, while DXT 3 & 5 do not.

Managing the premultiplied state of the alpha is left up to the user. In After Effects, you should set the output module's premultiplied state to match the format you're going to be using. In Photoshop, the plug-in provides an option to preform a premultiplication, and it is left up to the user to do use this feature where appropriate.

DXT5A saves only the alpha channel, at high quality. 3Dc and DXN are intended for normal maps. Uncompressed storage is not supported by most applications that use DDS.

## Cube Map

The plug-in can create a DDS cube map if your Photoshop document is in a vertical cross arrangement. The plug-in will make sure your file is 4/3 as tall as it is wide. It also requires that the height be a power of 2 for some reason.

## License

BSD

Copyright (c) 2014, Brendan Bolles All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Relies heavily on crnlib by Rich Geldreich, which is now public domain!