shader_transparent_water

🚧 This article is a stub. You can help expand it by submitting content in pull requests or issues in this wiki's source repo.

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.

Water shaders are not typically used for waterfalls (shader_transparent_chicago_extended) nor rivers (shader_transparent_chicago), though there are exceptions (the water in Battle Creek).

Known issues #

Ripple maps are not rendered correctly on PC 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.

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(16)
Flag Mask Comments
base map alpha modulates reflection 0x1
base map color modulates background 0x2
atmospheric fog 0x4
draw before fog 0x8
pad(2)
pad(32)
pad(16)
view perpendicular brightness Fraction: f32
  • Maximum: 1
view perpendicular tint color
ColorRGB
  • red: f32
  • green: f32
  • blue: f32
view parallel brightness Fraction: f32
  • Maximum: 1
  • Default value: 1.
view parallel tint color
ColorRGB
  • red: f32
  • green: f32
  • blue: f32
pad(16)
pad(16)
ripple animation angle Angle: f32
ripple animation velocity f32
ripple scale f32
  • Default value: 1.
ripple mipmap levels u16
pad(2)
ripple mipmap fade factor Fraction: f32
  • Maximum: 1
ripple mipmap detail bias f32
pad(64)
ripples Block?
  • Maximum: 4
Field Type Comments
pad(2)
pad(2)
contribution factor Fraction: f32
  • Maximum: 1
pad(32)
animation angle Angle: f32
animation velocity f32
map offset
Vector2D
  • i: f32
  • j: f32
map repeats u16
  • Default value: 1.
map index Index: u16
pad(16)
pad(16)

This information was partially generated using Invader tag definitions.

Acknowledgements

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

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