$selfillum: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 23: Line 23:




;<code>$selfillummask <texture></code> {{note|In Source 2007, use this, NOT $Selfillumtexture.}} {{note|$selfillummask does not work in conjunction with a bumpmap.}}
;<code>$selfillummask <texture></code> {{note|In Source 2007, use this, NOT $Selfillumtexture.}} {{note|$selfillummask does not work in conjunction with $bumpmap.}}





Revision as of 01:20, 7 April 2011

The $selfillum VMT command makes a material glow in the dark. Shaders commonly support this effect.

The effect is masked by default by the alpha channel of $basetexture, but there are other options (see below). Wherever the mask is located, white areas are self-illuminated while black areas are not.

Warning.pngWarning:Cannot be used with $translucent or similar values on models.
Todo: Possible fix?

VMT syntax example

$selfillum <bool>
LightmappedGeneric
{
    $basetexture props/tvscreen005a
    $selfillum 1
    $surfaceprop glass
}

Additional parameters

$selfillumtint "[<red float> <green float> <blue float>]"
Adjusts the colour of the self-illumination effect. Default value is "[1 1 1]".


$selfillummask <texture>
Note.pngNote:In Source 2007, use this, NOT $Selfillumtexture.
Note.pngNote:$selfillummask does not work in conjunction with $bumpmap.


A dedicated mask texture for the effect. Might not work in Ep1.
$selfillum_envmapmask_alpha <bool>
Has the material derive its self-illumination mask from the alpha channel of the $envmapmask. Requires DirectX 9.


$selfillumtexture <texture>
Use a selfillum texture.
Icon-Bug.pngBug:Deprecated with Source 2007; doesn't work.  [todo tested in ?]