$phong: Difference between revisions
Jump to navigation
Jump to search
Note:The Phong shader should use the default values for parameters that you omit from your VMT. However it appears that in some cases this doesn't happen and the shader doesn't work. Therefore it is recommended that you include all the paramters and specify the default values yourself.
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
# | * '''For a full explanation see [[Phong materials]].''' | ||
* Implemented in HL2 Episode 1. | |||
===Basic VMT syntax=== | |||
{{note|The Phong shader should use the default values for parameters that you omit from your VMT. However it appears that in some cases this doesn't happen and the shader doesn't work. Therefore it is recommended that you include all the paramters and specify the default values yourself.}} | |||
* Eg phong shader with default values (where available): | |||
"$phong" "1" | |||
"$phongexponenttexture" "path/to/vtf" | |||
"$phongexponent" "50" | |||
"$phongboost" "1.0" | |||
"$phongfresnelranges" "[0 0.5 1]" | |||
===Available values=== | |||
=====$phong===== | |||
"$phong" "1" | |||
* Values: "0" Disable or "1" Enable a Phong pass for this material. | |||
=====$phongexponenttexture===== | |||
"$phongexponenttexture" "path/to/vtf" | |||
* Values: Filename of texture which defines Phong exponent per texel. See [[Phong materials#Phong mask and exponent texture]] | |||
=====$phongexponent===== | |||
"$phongexponent" "50" | |||
* Values: <code>0 - 255</code> Default <code>50</code>. | |||
* Phong exponent for local specular lights. See [[Phong materials#Phong mask and exponent texture]] | |||
* Overides $phongexponenttexture applying a defined constant exponent value over the whole texture. | |||
=====$phongboost===== | |||
"$phongboost" "1.0" | |||
* Values: are unbound and can even be negative although this would probably provide worthless results. | |||
* Phong overbrightening factor. The phong mask channel should be authored to account for this. | |||
* The Phong boost value is an overbrightening factor applied to the Phong mask channel. The Phong mask channel should be authored to take the Phong boost value into account for this. | |||
=====$phongfresnelranges===== | |||
"$phongfresnelranges" "[0 0.5 1]" | |||
* Values: Default [0 0.5 1]. | |||
* Parameters for remapping Fresnel output. See [[Phong materials#Phong Fresnel ranges]] | |||
===Currently unsupported parameters=== | |||
=====$lightwarptexture===== | |||
* 1D ramp texture for tinting scalar diffuse term. Mentioned in the SDK samples. | |||
=====$phongalbedotint===== | |||
* Allow the base/albedo texture 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. | |||
=====$ambientocclusiontexture===== | |||
* Ambient occlusion texture or "dirtmap". Mentioned in the SDK samples and seen in the VMT for Alyx's face. | |||
[[Category:List of Shader Parameters]] | [[Category:List of Shader Parameters]] |
Revision as of 09:46, 10 November 2007
- For a full explanation see Phong materials.
- Implemented in HL2 Episode 1.
Basic VMT syntax

- Eg phong shader with default values (where available):
"$phong" "1" "$phongexponenttexture" "path/to/vtf" "$phongexponent" "50" "$phongboost" "1.0" "$phongfresnelranges" "[0 0.5 1]"
Available values
$phong
"$phong" "1"
- Values: "0" Disable or "1" Enable a Phong pass for this material.
$phongexponenttexture
"$phongexponenttexture" "path/to/vtf"
- Values: Filename of texture which defines Phong exponent per texel. See Phong materials#Phong mask and exponent texture
$phongexponent
"$phongexponent" "50"
- Values:
0 - 255
Default50
. - Phong exponent for local specular lights. See Phong materials#Phong mask and exponent texture
- Overides $phongexponenttexture applying a defined constant exponent value over the whole texture.
$phongboost
"$phongboost" "1.0"
- Values: are unbound and can even be negative although this would probably provide worthless results.
- Phong overbrightening factor. The phong mask channel should be authored to account for this.
- The Phong boost value is an overbrightening factor applied to the Phong mask channel. The Phong mask channel should be authored to take the Phong boost value into account for this.
$phongfresnelranges
"$phongfresnelranges" "[0 0.5 1]"
- Values: Default [0 0.5 1].
- Parameters for remapping Fresnel output. See Phong materials#Phong Fresnel ranges
Currently unsupported parameters
$lightwarptexture
- 1D ramp texture for tinting scalar diffuse term. Mentioned in the SDK samples.
$phongalbedotint
- Allow the base/albedo texture 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.
$ambientocclusiontexture
- Ambient occlusion texture or "dirtmap". Mentioned in the SDK samples and seen in the VMT for Alyx's face.