$envmap: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎$envmapoptional: Specified.)
(Added the $selfillum_envmapmask_alpha parameter.)
Line 107: Line 107:
* Default value is ''90''.
* Default value is ''90''.
* Requires DirectX 8.
* Requires DirectX 8.
====$selfillum_envmapmask_alpha====
$selfillum_envmapmask_alpha <float>
* Defines that selfillum value comes from envmap mask alpha.
* Default value is ''0.0''.
* Requires DirectX 9.
* A new parameter.


== See Also ==
== See Also ==

Revision as of 20:21, 22 January 2008

The $envmap VMT parameter defines the environment map of a material, normally reflecting the nearest env_cubemap.

Basic VMT Syntax

"$envmap" <texture>
  • This is the texture to use as the environment map (envmap).
  • Normally <texture> is set to "env_cubemap".


Additional Parameters

Adjust overall reflection color & contrast

$envmapcontrast

"$envmapcontrast" <float>
  • Controls the contrast (i.e. dynamic range) of the map.
  • The parameter accepts a value between 0 and 1, where 0 is the normal contrast, and 1 is the full squaring of the color (color*color).
  • Use higher contrasts to diminish relatively darker areas and increase "hot spots".


$envmapsaturation

"$envmapsaturation" <float>
  • Controls the saturation of the map.
  • The parameter accepts a value between 0 and 1, where 0 is 100% greyscale, and 1 is normal saturation.


$envmaptint

"$envmaptint" "[<float> <float> <float>]"
  • Controls the tint (red, green and blue components) of the map.
  • The default is "[1 1 1]".

Specular masking

$envmapmask

"$envmapmask" <texture>
  • Masks the map according to the alpha channel of the named <texture>.


$basealphaenvmapmask

"$basealphaenvmapmask" <flag>
  • The default value is 1.
  • Masks the envmap according to the alpha channel of the $basetexture texture.


$normalmapalphaenvmapmask

"$normalmapalphaenvmapmask" <flag>
  • The default value is 1.
  • Masks the envmap according to the alpha channel of the $bumpmap texture.


$envmapmasktransform

"$envmapmasktransform" <matrix>
  • ?
  • The default is "center .5 .5 scale 1 1 rotate 0 translate 0 0".
  • DirectX 9 or HDR required. (LightmappedGeneric, VertexlitGeneric, UnlitGeneric)
  • Also see $envmapmaskscale.


$envmapmaskscale

"$envmapmaskscale" <float>


$envmapmaskframe

"$envmapmaskframe" <integer>
  • ?


Other parameters

$envmapframe

"$envmapframe" <integer>
  • ?


$envmapmode

"$envmapmode" <flag>
  • Default is 1.


$envmapsphere

"$envmapsphere" <flag>
  • Default is 1.


$basetexturenoenvmap

"$basetexturenoenvmap" <boolean>


$basetexture2noenvmap

"$basetexture2noenvmap" <boolean>


$envmapoptional

"$envmapoptional" <integer>
  • Sets the oldest DirectX version required for the shader to do a specular pass.
  • Valid values are 80 (DirectX 8.0), 81 (DirectX 8.1) and 90 (DirectX 9.0).
  • Default value is 90.
  • Requires DirectX 8.


$selfillum_envmapmask_alpha

$selfillum_envmapmask_alpha <float>
  • Defines that selfillum value comes from envmap mask alpha.
  • Default value is 0.0.
  • Requires DirectX 9.
  • A new parameter.


See Also