shader_transparent_water

🚧 This incomplete article needs help! Please submit tips and info by pull requests or issues or contacting a maintainer.

Water shaders are characterized by their use of layered animated ripple maps, tint colours, and reflectance.

They need not exclusively be used for water -- the coolant pools of Keyes (d20) also use water shaders, and the Halo CE Refined project uses them for some glass to better emulate Xbox glass shaders. They are also not exclusively used within the BSP, with skies like Damnation's also using this shader type.

Flowing water with rapids, like waterfalls and rivers, can instead use shader_transparent_chicago which allows for more varied animation and map blending.

Base maps

Water shaders do not tile their base maps. Instead, the edges of the texture are "smeared" infinitely.

Known issues

Ripple maps are not rendered correctly in PC retail and Custom Edition compared to Xbox. The highest level of detail mipmap is used for the most distant areas, but water closer to the camera uses the lowest detail mipmap. This is the opposite of how it should be, and results in distant water suffering from major aliasing. The water shader was fixed in MCC.

Structure and fields

This tag inherits fields from shader which are not shown here. See the parent's page for more information. The following information is unique to the shader_transparent_water tag.

Field Type Comments
water flags bitfield
Flag Mask Comments
base map alpha modulates reflection 0x1
base map color modulates background 0x2
atmospheric fog 0x4
draw before fog 0x8
base map

TagDependency: bitmap

view perpendicular brightness float
  • Min: 0
  • Max: 1
view perpendicular tint color ColorRGB
Field Type Comments
red float
green float
blue float
view parallel brightness float
  • Min: 0
  • Max: 1
  • Default: 1
view parallel tint color ColorRGB?
reflection map

TagDependency: bitmap

ripple animation angle float
ripple animation velocity float
ripple scale float
  • Default: 1
ripple maps

TagDependency: bitmap

ripple mipmap levels uint16
  • Default: 1
ripple mipmap fade factor float
  • Min: 0
  • Max: 1
ripple mipmap detail bias float
ripples Block
  • HEK max count: 4
  • Max: 4
Field Type Comments
contribution factor float
  • Min: 0
  • Max: 1
animation angle float
animation velocity float
map offset Vector2D
Field Type Comments
i float
j float
map repeats uint16
  • Default: 1
map index uint16

Acknowledgements

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

  • gbMichelle (Discovering that base maps do not tile)
  • Kavawuvi (Invader tag definitions)
  • MosesOfEgypt (Tag structure research)