This article's documentation is for anything that uses the Source engine. Click here for more information.

$no draw: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(15 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$no_draw}}
{{LanguageBar}}
'''<code>no_draw</code>''' is a setting that causes the material to not be drawn or rendered at all. Usually used to quickly hide parts of a model.


$no_draw <[[bool]]>
{{stub}}
{{this is a|shader parameter|name=$no_draw}} It is a setting that causes the material to not be drawn or rendered at all. Usually used to quickly hide parts of a model, without having to make a transparent texture.


[[Category:List of Shader Parameters|N]]
Similar to [[%CompileNoDraw]], except this can be applied to models. This can be used as a workaround to the broken "Removemodel" on [[$lod]], or to have a material disappear in a specific skin.
 
{{confirm|Not on all shaders? Seems to not work on {{codelink|wireframe}}, since {{cmd|mat_wireframe}} causes the geometry to render.}}
 
== Example ==
<source lang=lua>
VertexLitGeneric
{
$no_draw 1
}
</source>
 
[[Category:Material System]]
[[Category:Shader parameters|no draw]]

Latest revision as of 10:18, 27 May 2025

English (en)Translate (Translate)

Stub

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

$no_draw is a material shader parameter available in all Source Source games. It is a setting that causes the material to not be drawn or rendered at all. Usually used to quickly hide parts of a model, without having to make a transparent texture.

Similar to %CompileNoDraw, except this can be applied to models. This can be used as a workaround to the broken "Removemodel" on $lod, or to have a material disappear in a specific skin.

Confirm:Not on all shaders? Seems to not work on wireframe, since mat_wireframe causes the geometry to render.

Example

VertexLitGeneric
{
$no_draw 1
}