TEXTURE

A TEXTURE block describes a surface which is based on texture data

A TEXTURE block describes a surface that can either be the contents of a texture file or the contents of a framebuffer/render texture.

The valid keywords and values for this block are outlined in the table below.

Table 1. Keywords

Keyword

Description

NAME

A text identifier for this texture.

PATH

The filename of the texture.

If spaces are included, enclose the path in quotation marks, for example, "base map.pvr".

MINIFICATION

Minification texture filter flags.

Valid values:

  • NEAREST
  • LINEAR

MAGNIFICATION

Magnification texture filter flags.

Valid values:

  • NEAREST
  • LINEAR

MIPMAP

MIP-map texture filter flags.

Valid values:

  • NEAREST
  • LINEAR
  • NONE

VIEW

Specifying the VIEW keyword modifies the functionality of the defined texture to be a render texture of the current scene.

Valid values:

  • PFX_CURRENTVIEW
  • POD camera name in optional quotation mark, e.g., "Camera01".

CAMERA

An alias for VIEW.

RESOLUTION

Describes the resolution of the texture. This will be ignored if PATH is specified, where the resolution will be that of the loaded texture.

WRAP_x

Where x is a valid axis (S, T, or R). Specifies the texture wrapping in the defined axis.

Valid values:

  • REPEAT
  • CLAMP

SURFACETYPE

Describes the surface/pixel type of the texture. This will be ignored if PATH is specified, where the surface type will be that of the loaded texture.

Valid values:

  • RGBA8888
  • RGBA4444
  • RGB888
  • RGB565

FILTER

[Deprecated] Allows the specification of texture filter flags in short-hand.

Valid values are hyphen separated filter flags in the order of minification, magnification, and MIP-map, e.g., LINEAR-LINEAR-LINEAR enables trilinear texture filtering, or LINEAR-LINEAR-NONE enables bilinear.

WRAP

[Deprecated] Allows the specification of texture wrapping flags in short-hand.

Valid values are hyphen separated wrapping flags in the order of axis S, T, and R. For example REPEAT-CLAMP-CLAMP.

Table 2. Values (texture block)

Value

Associated Keyword

Description

PFX_CURRENTVIEW

VIEW

CAMERA

Indicates that the render texture should be derived from the current view of the scene and not from a specific POD file camera.

LINEAR

MINIFICATION

MAGNIFICATION

MIP-MAP

Linearly interpolates between sampled texels.

NEAREST

MINIFICATION

MAGNIFICATION

MIP-MAP

Chooses nearest texel based on Manhattan distance.

NONE

MIP-MAP

Disable MIP-mapping.

CLAMP

WRAP_S

WRAP_T

WRAP_R

Clamps to texture border.

REPEAT

WRAP_S

WRAP_T

WRAP_R

Repeats at texture border.

RGBA8888

SURFACETYPE

32bit RGBA texture format.

RGBA4444

SURFACETYPE

16bit RGBA texture format.

RGB888

SURFACETYPE

24bit RGB texture format.

RGB565

SURFACETYPE

16bit RGB texture format.

INTENSITY8

SURFACETYPE

8bit intensity texture format.

Example code

[TEXTURE]
       // Keyword               // Value
	NAME			cat
	PATH			cat_texture.pvr
	MINIFICATION	      LINEAR
	MAGNIFICATION	     LINEAR
	MIPMAP		     NEAREST
	WRAP_S		     CLAMP
	WRAP_T		     CLAMP
[/TEXTURE]