$selfillum: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (reminder for later)
No edit summary
Line 1: Line 1:
The [[$selfillum]] [[VMT command]] uses the [[alpha channel]] of the [[$basetexture]] to set minumum clamps on the lighting, making it seem like the material glows in the dark.
The [[$selfillum]] [[VMT command]] makes a material glow in the dark. Shaders commonly support this effect.
* Alternatively, for Dx9 only, see [[$selfillum_envmapmask_alpha]] to use the alpha channel of the [[$envmapmask]] VTF for the luminosity map.
 
* For the texture's alpha channel, a value of ''255'' means 100% self-illumination, while an alpha value of ''0'' means 0% self-illumination.
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==
==VMT syntax example==
  "[[LightmappedGeneric]]"
 
$selfillum <[[bool]]>
 
  [[LightmappedGeneric]]
  {
  {
     "[[$basetexture]]" "props/tvscreen005a"
     [[$basetexture]] props/tvscreen005a
     "[[$selfillum]]" "1"
     '''$selfillum 1'''
     "[[$surfaceprop]]" "glass"
     [[$surfaceprop]] glass
  }
  }


==Additional Parameters==
==Additional parameters==
 
===$selfillumtint===
The [[$selfillumtint]] [[VMT command]] is used to adjust the color of [[$selfillum]].
"$selfillumtint" {{todo|values?}}
 
{{todo|$selfillummask}}
 
==See Also==
* [[$selfillum_envmapmask_alpha]]
* [[$basetexture]]
* [[$envmapmask]] (specular mask)
* [[$envmap]] (environment map)
* [[$phong]] (diffuse reflection)


; <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:List of Shader Parameters]]
[[Category:VMT Lighting]]
[[Category:VMT Lighting]]

Revision as of 02:22, 13 July 2008

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

The effect is masked either by the alpha channel of $basetexture or with a greyscale texture specified with $selfillummask. 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

$selfillumtint <RGB matrix>
Adjusts the colour of the self-illumination effect. Default value is "[1 1 1]".
$selfillummask <texture>
A dedicated masking texture for the effect. If this command is not used, the alpha channel of $basetexture will be used instead. 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.