CompileWater: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (SirYodaJedi moved page %CompileWater to CompileWater: move to prevent external links from being eaten)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{subpage|[[Material map compile flags]]}}
{{subpage|[[Material map compile flags]]}}{{DISPLAYTITLE:%CompileWater}}
{{stub}}
{{stub}}
Compiles the texture as having [[water]] [[Contents flags|contents]] (CONTENTS_WATER).
Compiles the texture as having [[water]] [[Contents flags|contents]] (CONTENTS_WATER).
Line 13: Line 13:
  }
  }
{{important|When using stock VBSP, detail contents are automatically removed from %CompileWater materials. While this is necessary for shaders with real-time reflections and refractions, such as [[Water (shader)|Water]] and [[Refract]], this means superfluous visleaves will be cut if using a shader without them, such as [[LightmappedGeneric]] or [[UnlitTwoTexture]]. If this is an issue, consider tying the water to a [[func_water_analog]].
{{important|When using stock VBSP, detail contents are automatically removed from %CompileWater materials. While this is necessary for shaders with real-time reflections and refractions, such as [[Water (shader)|Water]] and [[Refract]], this means superfluous visleaves will be cut if using a shader without them, such as [[LightmappedGeneric]] or [[UnlitTwoTexture]]. If this is an issue, consider tying the water to a [[func_water_analog]].
{{codenote|Attempting to modify VBSP to apply [[%CompileDetail|CONTENTS_DETAIL]] on a water world brush will result in the water being invisible in-game. The associated particle effects will still be present, however.}} }}
{{codenote|Attempting to modify VBSP to apply [[CONTENTS_DETAIL]] on a water world brush will result in the water being invisible in-game. The associated particle effects will still be present, however, and the water will still be swimmable.}} }}


== See also ==
== See also ==

Latest revision as of 11:35, 1 May 2025

Stub

This article or section is a stub. You can help by expanding it.

Compiles the texture as having water contents (CONTENTS_WATER).

Example:

LightmappedGeneric
{
$basetexture "liquids/custom_water"
$bottommaterial "liquids/custom_water"
%compilewater 1
$nocull 1
}
Icon-Important.pngImportant:When using stock VBSP, detail contents are automatically removed from %CompileWater materials. While this is necessary for shaders with real-time reflections and refractions, such as Water and Refract, this means superfluous visleaves will be cut if using a shader without them, such as LightmappedGeneric or UnlitTwoTexture. If this is an issue, consider tying the water to a func_water_analog.
Cpp.pngCode:Attempting to modify VBSP to apply CONTENTS_DETAIL on a water world brush will result in the water being invisible in-game. The associated particle effects will still be present, however, and the water will still be swimmable.

See also