This article's documentation is for anything that uses the Source engine. Click here for more information.

DepthWrite

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)

DepthWrite is a Pixel shader available in all Source Source games. The shader used for writting hardware or colored depth for Depth buffer, Cascaded Shadow Maps or Projected texture.

Supported Parameters

Basics

$color_depth <boolean>
Write depth as color.
$vsm <boolean> (only in TitanfallTitanfall 2)
Write VSM (Variance Shadow Maps) shadow moments instead of depth.
$zFill <float> (only in TitanfallTitanfall 2)
Use for zfill, not depth texturebuilding (no poly offset, enable culling).
$zFillPolyOffset <float> (only in TitanfallTitanfall 2)
Use for occluder zfill (use poly offset,enable culling).

Transparency

$basetexture <texture>
Used for $alphatest, using alpha channel of texture.
$alphatest <boolean>
Allow $alphatest support, using $basetexture.
$alphatestreference <float>
Alpha reference value.
$nocull <boolean>
$nocull disables backface culling optimization.

Adjustment

$basetexturetransform <matrix> (only in Garry's Mod)
Transform $basetexture's alignment, scale, rotation and position.

Effect

$treeSway <boolean> (in all games since Left 4 Dead) (also in Team Fortress 2MapbaseGarry's ModBlack Mesa)
Vertex manipulation to give the effect of trees swaying in the wind.
$displacementmap <texture> (only in Counter-Strike: Global Offensive)
Displacement map.
$displacementwrtinkle <boolean> (only in Counter-Strike: Global Offensive)
Displacement map contains wrinkle displacements.

See also