This page is incomplete! You can contribute information using GitHub issues or pull requests.

Shader tags define the visual appearance of models in the game world. The shader tag class itself is abstract and cannot be created directly, but is extended by the various child shader types like shader_model and shader_environment.

Structure and fields

FieldTypeComments
shader flagsbitfield
FlagMaskComments
simple parameterization0x1

Causes lightmap UVs for this material to be based on existing texture UVs rather than generated completely anew by Tool/Sapien. This can be used to fix squiggly or jagged shadowing artifacts often seen on large complex surfaces using a single material. Note that any overlapping UV faces may cause lighting artifacts because one part of the lightmap texture is being used to represent different locations.

ignore normals0x2

Lighting will ignore surface normals (the direction faces point). Use this for shaders where the surface normals are not a good representation of lighting directionality, such as foliage mapped to flat planes for trees and bushes.

transparent lit0x4
detail levelenum

Determines how detailed lightmaps will be for surfaces using this shader. This affects various radiosity tessellation parameters.

OptionValueComments
high0x0

The surface will receive the highest possible quality of lightmaps. Shadows will be sharper and there will be greater detail in local variations in lighting.

medium0x1

The surface will receive a medium quality of lightmaps.

low0x2

The surface will receive a low quality of lightmaps.

turd0x3

The surface will receive the worst possible quality of lightmaps. Use this for shaders which will be used in areas which do not need detailed shadows or the player is unlikely to visit in order to save texture space.

powerfloat
color of emitted lightColorRGB
tint colorColorRGB

Tints the light passing through this surface during radiosity, resulting in coloured shadows. Black completely blocks light and white is totally transparent. Tinting is supported on all shader types that can be used in the BSP, but is only applicable when the transparent (#) or double-sided (%) BSP material symbols are set.

physics flagsbitfield
  • Hidden
FlagMaskComments
unused0x1
material typeenum
OptionValueComments
dirt0x0
sand0x1
stone0x2
snow0x3
wood0x4
metal hollow0x5
metal thin0x6
metal thick0x7
rubber0x8
glass0x9

Required for breakable surfaces using the - symbol.

force field0xA
grunt0xB
hunter armor0xC
hunter skin0xD
elite0xE
jackal0xF
jackal energy shield0x10
engineer skin0x11
engineer force field0x12
flood combat form0x13
flood carrier form0x14
cyborg armor0x15
cyborg energy shield0x16
human armor0x17
human skin0x18
sentinel0x19
monitor0x1A
plastic0x1B
water0x1C
leaves0x1D
elite energy shield0x1E
ice0x1F
hunter shield0x20
shader typeuint16
  • Volatile

Acknowledgements

Thanks to the following individuals for their research or contributions to this topic:

  • Kavawuvi (Invader tag definitions)
  • MosesOfEgypt (Tag structure research)