$envmap: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added the $selfillum_envmapmask_alpha parameter.)
mNo edit summary
Line 5: Line 5:
* This is the texture to use as the environment map (envmap).
* This is the texture to use as the environment map (envmap).
* Normally <nowiki><texture></nowiki> is set to ''"env_cubemap"''.
* Normally <nowiki><texture></nowiki> is set to ''"env_cubemap"''.
* See also [[$envmapmask]].




== Additional Parameters ==
== Additional Parameters ==
=== Adjust overall reflection color & contrast ===


====$envmapcontrast====
====$envmapcontrast====
  "$envmapcontrast" <float>
  "$envmapcontrast" <float>
* Controls the contrast (i.e. dynamic range) of the map.
* Controls the contrast (i.e. dynamic range) of the reflected [[$envmap]].
* 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).
* 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".  
* Use higher contrasts to diminish relatively darker areas and increase "hot spots".  
Line 21: Line 19:
====$envmapsaturation====
====$envmapsaturation====
  "$envmapsaturation" <float>
  "$envmapsaturation" <float>
* Controls the saturation of the map.
* Controls the colour saturation of the reflected [[$envmap]].
* The parameter accepts a value between ''0'' and ''1'', where ''0'' is 100% greyscale, and ''1'' is normal saturation.
* The parameter accepts a value between ''0'' and ''1'', where ''0'' is 100% greyscale, and ''1'' is normal saturation.


Line 27: Line 25:
====$envmaptint====
====$envmaptint====
  "$envmaptint" "[<float> <float> <float>]"
  "$envmaptint" "[<float> <float> <float>]"
* Controls the tint (red, green and blue components) of the map.
* Controls the tint (red, green and blue channels) of the reflected [[$envmap]].
* The default is ''"[1 1 1]"''.
* The default is ''"[1 1 1]"''.
===Specular masking===
====$envmapmask====
"$envmapmask" <texture>
* Masks the map according to the alpha channel of the named <code><texture></code>.
====$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>
* Scales the [[$envmapmask]] by the <nowiki><float></nowiki> value.
* DirectX 8 required. (LightmappedGeneric, VertexlitGeneric, UnlitGeneric)
* Also see [[$envmapmasktransform]].
====$envmapmaskframe====
"$envmapmaskframe" <integer>
* ?


=== Other parameters ===


====$envmapframe====
====$envmapframe====
  "$envmapframe" <integer>
  "$envmapframe" <integer>
* ?
* {{todo|?}}




====$envmapmode====
====$envmapmode====
  "$envmapmode" <flag>
  "$envmapmode" 1
* Default is ''1''.
* {{todo|?}}




====$envmapsphere====
====$envmapsphere====
  "$envmapsphere" <flag>
  "$envmapsphere" 1
* Default is ''1''.
* {{todo|?}}




====$basetexturenoenvmap====
====$basetexturenoenvmap====
* Requires DirectX 9.
  "$basetexturenoenvmap" <boolean>
  "$basetexturenoenvmap" <boolean>
* {{todo|what does it do?}}
* Default is ''0''.
* Default is ''0''.
* DirectX 9 required.
* See also [[$basetexture]].
* See also [[$basetexture]].




====$basetexture2noenvmap====
====$basetexture2noenvmap====
* Requires DirectX 9.
  "$basetexture2noenvmap" <boolean>
  "$basetexture2noenvmap" <boolean>
* {{todo|what does it do?}}
* Default is ''0''.
* Default is ''0''.
* DirectX 9 required.
* See also [[$basetexture2]].
* See also [[$basetexture2]].




====$envmapoptional====
====$envmapoptional====
  "$envmapoptional" <integer>
* Requires DirectX 8.
  "$envmapoptional" <choices>
* Sets the oldest DirectX version required for the shader to do a specular pass.
* 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).
* Valid values are:
* Default value is ''90''.
**<code>80</code> (DirectX 8.0)
* Requires DirectX 8.
**<code>81</code> (DirectX 8.1)  
**<code>90</code> (DirectX 9.0)
* Default value is <code>90</code>.


====$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.




Line 125: Line 80:
[[Category:List of Shader Parameters]]
[[Category:List of Shader Parameters]]
[[Category:VMT Reflections]]
[[Category:VMT Reflections]]
[[Category:Stubs]]
[[Category:VMT Lighting]]

Revision as of 15:40, 5 April 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".
  • See also $envmapmask.


Additional Parameters

$envmapcontrast

"$envmapcontrast" <float>
  • Controls the contrast (i.e. dynamic range) of the reflected $envmap.
  • 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 colour saturation of the reflected $envmap.
  • 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 channels) of the reflected $envmap.
  • The default is "[1 1 1]".


$envmapframe

"$envmapframe" <integer>
  • Todo: ?


$envmapmode

"$envmapmode" 1
  • Todo: ?


$envmapsphere

"$envmapsphere" 1
  • Todo: ?


$basetexturenoenvmap

  • Requires DirectX 9.
"$basetexturenoenvmap" <boolean>
  • Todo: what does it do?
  • Default is 0.
  • See also $basetexture.


$basetexture2noenvmap

  • Requires DirectX 9.
"$basetexture2noenvmap" <boolean>


$envmapoptional

  • Requires DirectX 8.
"$envmapoptional" <choices>
  • 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)
    • 90 (DirectX 9.0)
  • Default value is 90.


See Also