$phong: Difference between revisions
Jump to navigation
Jump to search
Note:Phong shading is only available with VertexLitGeneric.
mNo edit summary |
m (removing irrelevant info) |
||
Line 27: | Line 27: | ||
: See <code>[[$bumpmap]]</code>. Its [[alpha channel]] acts as a Phong mask. | : See <code>[[$bumpmap]]</code>. Its [[alpha channel]] acts as a Phong mask. | ||
;<code>$basemapalphaphongmask <1/0></code> | ;<code>$basemapalphaphongmask <1/0></code> | ||
: | : Enable this if the Phong mask is in the <code>[[$basetexture]]</code> [[alpha channel]]. | ||
; <code>$phongexponent <[[int]]></code> | ; <code>$phongexponent <[[int]]></code> | ||
; <code>$phongexponenttexture <texture></code> | ; <code>$phongexponenttexture <texture></code> | ||
: See [[Phong materials#Phong mask and exponent texture|Phong mask and exponent texture]]. The texture value is overridden by the numeric value | : See [[Phong materials#Phong mask and exponent texture|Phong mask and exponent texture]]. The texture value is overridden by the numeric value if both are present. | ||
; <code>$phongboost <int></code> | ; <code>$phongboost <int></code> | ||
: Phong overbrightening factor. The phong mask channel should be authored to account for this. | : Phong overbrightening factor. The phong mask channel should be authored to account for this. | ||
Line 37: | Line 37: | ||
; <code>$phongfresnelranges <matrix></code> | ; <code>$phongfresnelranges <matrix></code> | ||
: See [[Phong materials#Phong Fresnel ranges|Phong Fresnel ranges]]. Default is <code>"[0 0.5 1]"</code>. | : See [[Phong materials#Phong Fresnel ranges|Phong Fresnel ranges]]. Default is <code>"[0 0.5 1]"</code>. | ||
; <code>$phongwarptexture <texture></code> | ; <code>$phongwarptexture <texture></code> {{EP2 add}} | ||
: Used to create an iridescence effect on [[npc_hunter]]s. | : Used to create an iridescence effect, as seen on [[npc_hunter]]s. | ||
: {{TODO|Needs documentation.}} | : {{TODO|Needs documentation.}} | ||
; <code>$phongalbedotint <?></code> | ; <code>$phongalbedotint <?></code> | ||
: Allow the [[albedo]] (i.e. [[$basetexture]]) to affect the colour tint of the Phong highlight? Possibly related to the green channel of the Phong exponent mask. Seen in some Day of Defeat: Source player model VMTs. | : Allow the [[albedo]] (i.e. [[$basetexture]]) to affect the colour tint of the Phong highlight? Possibly related to the green channel of the Phong exponent mask. Seen in some Day of Defeat: Source player model VMTs. | ||
Line 47: | Line 45: | ||
;<code>$ambientocclusiontexture <texture></code> | ;<code>$ambientocclusiontexture <texture></code> | ||
: A "dirtmap". Mentioned in the SDK samples and seen in the VMT for Alyx's face. | : A "dirtmap". Mentioned in the SDK samples and seen in the VMT for Alyx's face. | ||
: {{TODO|Needs documentation.}} | : {{TODO|Needs documentation. }} | ||
;<code>"GPU>=2?$phong" 1</code> | ;<code>"GPU>=2?$phong" 1</code> | ||
: (Use with <code>$phong 0</code>) Only uses phong if the current PC is using dual GPUs. | : (Use with <code>$phong 0</code>) Only uses phong if the current PC is using dual GPUs. | ||
Line 58: | Line 56: | ||
* [[$envmapmask]] (specular mask) | * [[$envmapmask]] (specular mask) | ||
* [[$envmap]] (environment map) | * [[$envmap]] (environment map) | ||
* [[$ | * [[$lightwarptexture]] | ||
* [[$rimlight]] | * [[$rimlight]] | ||
[[Category:List of Shader Parameters|P]] | [[Category:List of Shader Parameters|P]] | ||
[[Category:VMT Lighting]] | [[Category:VMT Lighting]] |
Revision as of 01:52, 13 August 2010
The $phong
VMT command provides diffuse reflections. For a full explanation, see Phong materials.

VMT syntax
$phong <bool>
The Phong shader should use the default values for any configuration parameters that you omit from your material. However it appears that this doesn't happen. Therefore all of the below parameters are required, even if they stay on their default values.
VertexLitGeneric { $phong 1 $bumpmap <texture> $phongexponent 5 // either/or $phongexponenttexture <texture> // either/or $phongboost 1.0 $phongfresnelranges "[0 0.5 1]" }
Additional parameters
$bumpmap <texture>
- See
$bumpmap
. Its alpha channel acts as a Phong mask. $basemapalphaphongmask <1/0>
- Enable this if the Phong mask is in the
$basetexture
alpha channel. $phongexponent <int>
$phongexponenttexture <texture>
- See Phong mask and exponent texture. The texture value is overridden by the numeric value if both are present.
$phongboost <int>
- Phong overbrightening factor. The phong mask channel should be authored to account for this.
$phongtint "[<red float> <green float> <blue float>]"
- Modifies the colour of the phong reflection.
"[0 0 0]"
means the feature is disabled. $phongfresnelranges <matrix>
- See Phong Fresnel ranges. Default is
"[0 0.5 1]"
. $phongwarptexture <texture>
Template:EP2 add- Used to create an iridescence effect, as seen on npc_hunters.
- Todo: Needs documentation.
$phongalbedotint <?>
- Allow the albedo (i.e. $basetexture) to affect the colour tint of the Phong highlight? Possibly related to the green channel of the Phong exponent mask. Seen in some Day of Defeat: Source player model VMTs.
- Todo: Needs documentation.
$ambientocclusiontexture <texture>
- A "dirtmap". Mentioned in the SDK samples and seen in the VMT for Alyx's face.
- Todo: Needs documentation.
"GPU>=2?$phong" 1
- (Use with
$phong 0
) Only uses phong if the current PC is using dual GPUs. - Todo: Check if correct, it may be wrong
See also
- Phong materials
- $basetexture
- $envmapmask (specular mask)
- $envmap (environment map)
- $lightwarptexture
- $rimlight