[quote]Adding Water to a Level
Water is a very complex shader inside of the Source engine: it is animated, reflective, fogged, refractive, and bump mapped. With this complexity come rules and restrictions on how it is placed and what sort of water is used in different situations.
?Expensive? Water
This sort of water is the best looking, but also carries the most cost. This shader will reflect the world around it, refract and fog the world beneath it (based on the line integral through the water volume), and animate a bump mapped texture on the surface. While the results are photo-realistic, the cost can sometimes be too prohibitive for complex scenes.
?Cheap? Water
For situations where a more simplistic water solution is called for (normally for performance reasons), ?cheap? water may be used. This version of water does not reflect the world around it, making it less realistic, but also much cheaper. Expensive water will ?fallback? to cheap water on video cards that are unable to support the features necessary for it to render properly. It will also fallback to this material if the user overrides the visual quality setting for water?s appearance in the Video options in-game.
Requirements
To make it perform efficiently, water also has a collection of rules regarding its placement and usage inside of a map:
* There may be only one water level height in a PVS if the water is expensive.
* ?Expensive? and ?cheap? water may not be used simultaneously in the same PVS.
* The water?s surface should never slope in the Z-axis; it should always be parallel to the horizon line in a map.
* Water is created by applying a water material to the top-most surface of a brush, while covering the remaining faces with the toolstoolsnodraw material.
* The water_lod_control entity controls the distance at which expensive water transitions into cheap water.
* An env_cubemap entity must be present for the water surface to render properly on sub-DX9 hardware.
Note: Water is not a brush entity, and should not be attached an entity. Water brushes included in any brush entity will not render correctly.[/quote]