TexGen (Material stage keyword)

Description

The texgen stage keyword modifies the texture coordinates of the associated map as required by certain effects, such as skyboxes.

Usage

texGen <type>

Parameters

The type parameter can be any of the following values:

normal
Unknown effect.

skybox
Set the appropriate texture coordinates for a skybox. The associated stage should be a cameraCubeMap .

wobblesky <x> <y> <z>
Same as skybox , but rotate the coordinates according to the axis given

reflect
Use the defined stage map for environment mapping.

Example

The following is a typical skybox map stage.

{
  blend add
  cameraCubeMap env/someskymap
  texgen skybox
}

Notes

Setting the “z” component of “wobblesky” to a positive value causes the skybox to rotate continuously around the vertical axis. This is used in Doom 3 in some of the Hell levels.

See also

How to add a sky