$selfillum: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(24 intermediate revisions by 10 users not shown)
Line 1: Line 1:
The [[$selfillum]] [[VMT command]] makes a material glow in the dark. Shaders commonly support this effect.
#redirect [[Glowing textures (Source)#$selfillum]]
 
[[Category:Shader parameters|s]]
The effect is masked either by the [[alpha channel]] of <code>[[$basetexture]]</code> or with a greyscale texture specified with <code>$selfillummask</code>. In either case, white areas are self-illuminated while black areas are not.
 
==VMT syntax example==
 
$selfillum <[[bool]]>
 
[[LightmappedGeneric]]
{
    [[$basetexture]] props/tvscreen005a
    '''$selfillum 1'''
    [[$surfaceprop]] glass
}
 
==Additional parameters==
 
; <code>$selfillumtint <[[RGB]] matrix></code>
: Adjusts the colour of the self-illumination effect. Default value is "[1 1 1]".
;<code>$selfillummask <texture></code>
: A dedicated masking texture for the effect. If this command is not used, the [[alpha channel]] of <code>$basetexture</code> will be used instead. Might not work in Ep1.
; <code>$selfillum_envmapmask_alpha <[[bool]]></code>
: Has the material derive its self-illumination mask from the alpha channel of the <code>[[$envmapmask]]</code>. Requires DirectX 9.
 
[[Category:List of Shader Parameters]]
[[Category:VMT Lighting]]

Latest revision as of 10:05, 15 August 2023