Liquid materials: Difference between revisions
Jump to navigation
Jump to search

Note:If the above water material does not have reflections, refractions, or $underwateroverlay: $abovewater can be omitted, $nocull can be used, and $bottommaterial can be set to the same material as the abovewater material.
SirYodaJedi (talk | contribs) No edit summary |
SirYodaJedi (talk | contribs) (→Fog) |
||
Line 19: | Line 19: | ||
=== Fog === | === Fog === | ||
{{MatParam|$fogenable|bool|Enable volumetric fog for the water. | {{MatParam|$fogenable|bool|Enable volumetric fog for the water. Note that the [[Water (Shader)|Water]] shader will always have fog regardless of this parameter, but $fogstart and $fogend will not work without it. Optional for all other shaders.}} | ||
{{MatParam|$fogcolor|RGB matrix|Color of the water’s volumetric fog. Generally this value should match the color used in the bottom material.<br> | {{MatParam|$fogcolor|RGB matrix|Color of the water’s volumetric fog. Generally this value should match the color used in the bottom material.<br> | ||
{{Important| If this parameter is not defined in a VMT, the shader will force its value to <code>"[1 0 0]"</code> and spew an error message saying <code>Material x needs to have a $fogcolor.</code>}} | {{Important| If this parameter is not defined in a VMT, the shader will force its value to <code>"[1 0 0]"</code> and spew an error message saying <code>Material x needs to have a $fogcolor.</code>}} |
Revision as of 13:04, 17 March 2025


Water does not need to use the Water shader! If a less realistic effect is desired, or the water volume is oddly shaped, other shaders can be used, such as LightmappedGeneric or Refract. The method for creating the materials is the same.
Parameters

Fog
Other
WaterLOD proxy
- This connects the water_lod_control entity in a level to the water’s internal parameters. This must be declared in the material for the LOD mechanisms to work properly.