CompileSlime: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{subpage|[[Material map compile flags]]}}
{{subpage|[[Material map compile flags]]}}
{{Dead end}}
{{stub}}{{DISPLAYTITLE:%CompileSlime}}
{{stub}}
Compiles the texture as a [[slime]] texture. In most games, the differences between slime and [[water]] are purely cosmetic, and a separate [[trigger_hurt]] will be necessary to cause slime to do the expected damage.
Compiles the texture as a [[slime]] texture. In most games, the differences between slime and [[water]] are purely cosmetic, and a separate [[trigger_hurt]] will be necessary to cause slime to do the expected damage.


Line 13: Line 12:
  $nocull 1
  $nocull 1
  }
  }
{{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]] (note that particle effects will be inaccurate).
{{codenote|Attempting to modify VBSP to apply [[CONTENTS_DETAIL]] on a slime world brush will result in the slime being invisible in-game. The associated particle effects will still be present, however, and the slime will still be swimmable.}} }}
== See also ==
* {{cmd|%CompileWater}}


[[Category:Material System]]
[[Category:Material System]]
[[Category:Shader parameters]]
[[Category:Shader parameters]]

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 a slime texture. In most games, the differences between slime and water are purely cosmetic, and a separate trigger_hurt will be necessary to cause slime to do the expected damage.

Example:

UnlitGeneric
{
$basetexture "liquids/custom_slime"
$bottommaterial "liquids/custom_slime"
%compileslime 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 (note that particle effects will be inaccurate).
Cpp.pngCode:Attempting to modify VBSP to apply CONTENTS_DETAIL on a slime world brush will result in the slime being invisible in-game. The associated particle effects will still be present, however, and the slime will still be swimmable.

See also