# NIF File Format Documentation

NIF Objects | Compound Types | Enum Types | Basic Types | File Versions

## TexDesc

Texture description.

### Attributes

Name | Type | Arg | Arr1 | Arr2 | Cond | Description | From | To
--- | --- | --- | --- | --- | --- | --- | --- | ---
Source | Ref<NiSourceTexture> |  |  |  |  | NiSourceTexture object index. |  |
Clamp Mode | TexClampMode |  |  |  |  | 0=clamp S clamp T, 1=clamp S wrap T, 2=wrap S clamp T, 3=wrap S wrap T |  | 20.0.0.5
Filter Mode | TexFilterMode |  |  |  |  | 0=nearest, 1=bilinear, 2=trilinear, 3=..., 4=..., 5=... |  | 20.0.0.5
Flags | Flags |  |  |  |  | Texture mode flags; clamp and filter mode stored in upper byte with 0xYZ00 = clamp mode Y, filter mode Z. | 20.1.0.3 |
Unknown short | short |  |  |  |  | Unknown, seems to always be 1 | 20.6.0.0 |
UV Set | uint |  |  |  |  | The texture coordinate set in NiGeometryData that this texture slot will use. |  | 20.0.0.5
PS2 L | short |  |  |  |  | PS2 only; from the Freedom Force docs, "L values can range from 0 to 3 and are used to specify how fast a texture gets blurry". |  | 10.4.0.1
PS2 K | short |  |  |  |  | PS2 only; from the Freedom Force docs, "The K value is used as an offset into the mipmap levels and can range from -2047 to 2047. Positive values push the mipmap towards being blurry and negative values make the mipmap sharper." -75 for most v4.0.0.2 meshes. |  | 10.4.0.1
Unknown1 | ushort |  |  |  |  | Unknown, 0 or 0x0101? |  | 4.1.0.12
Has Texture Transform | bool |  |  |  |  | Determines whether or not the texture's coordinates are transformed. | 10.1.0.0 |
Translation | TexCoord |  |  |  | hasTextureTransform | The amount to translate the texture coordinates in each direction? | 10.1.0.0 |
Tiling | TexCoord |  |  |  | hasTextureTransform | The number of times the texture is tiled in each direction? | 10.1.0.0 |
W Rotation | float |  |  |  | hasTextureTransform | 2D Rotation of texture image around third W axis after U and V. | 10.1.0.0 |
Transform Type? | uint |  |  |  | hasTextureTransform | The texture transform type? Doesn't seem to do anything. | 10.1.0.0 |
Center Offset | TexCoord |  |  |  | hasTextureTransform | The offset from the origin? | 10.1.0.0 |

### Found In

- NiTexturingProperty
- ShaderTexDesc