$alpha: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Setting bug notice hidetested=1 param on page where the bug might not need tested in param specified)
 
(21 intermediate revisions by 15 users not shown)
Line 1: Line 1:
Scales the opacity of an entire material by the given value. 1 is entirely opaque, 0 is invisible.
{{LanguageBar|title=$alpha}}
{{stub}}


If ''any'' material on a [[brush]] has <code>$alpha</code>, the brush will stop affected [[VIS]] and become entirely transparent to NPCs from every angle.
'''<code style="color:white">$alpha</code>''' is a [[material]] [[shader]] parameter. It scales the [[opacity]] of an entire material by the given value. 1 is entirely opaque, 0 is invisible.


== Syntax ==
If ''any'' material on a [[brush]] has <code>$alpha</code>, the brush will stop affecting [[VVIS]] and become entirely transparent to [[NPC]]s from every angle.


$alpha <[[normal]]>
This may be used with <code>[[$translucent]]</code>, although using <code>[[$translucent]]</code> here is redundant, as any <code>[[$alpha]]</code> different than 1 will already apply the <code>[[$translucent]]</code> parameter.


== See also ==
This cannot be used with <code>[[$alphatest]]</code>. If used, the material will be invisible. (Does not apply to [[L4D2]])
{{bug|hidetested=1|Not available in [[VertexLitGeneric]] (Is available in [[L4D2]]).}}


*<code>[[$translucent]]</code>, for per-pixel opacity.
==Syntax==
'''$alpha <[[normal]]>'''


==See also==
*<code>[[$alphatest]]</code>
*<code>[[$distancealpha]]</code>
*<code>[[$vertexalpha]]</code>


[[Category:List of Shader Parameters|A]]
[[Category:Shader parameters|alpha]]
[[Category:VMT Transparency]]

Latest revision as of 07:13, 20 May 2025

English (en)Deutsch (de)Español (es)Français (fr)Русский (ru)Translate (Translate)

Stub

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

$alpha is a material shader parameter. It scales the opacity of an entire material by the given value. 1 is entirely opaque, 0 is invisible.

If any material on a brush has $alpha, the brush will stop affecting VVIS and become entirely transparent to NPCs from every angle.

This may be used with $translucent, although using $translucent here is redundant, as any $alpha different than 1 will already apply the $translucent parameter.

This cannot be used with $alphatest. If used, the material will be invisible. (Does not apply to L4D2)

Icon-Bug.pngBug:Not available in VertexLitGeneric (Is available in L4D2).

Syntax

$alpha	<normal>

See also