Character (shader)

From Valve Developer Community
Revision as of 17:56, 24 April 2021 by 9yz (talk | contribs) (Clarity edit)
Jump to navigation Jump to search

Stub

This article or section is a stub. You can help by expanding it.

Character on left, VertexLitGeneric on right.

Character is a material shader available in Counter-Strike: Global Offensive. Shares most generic parameters of VertexLitGeneric. It takes advantage of mask textures to tune rimlighting, phong shading and other parameters.

Tip.pngTip:It might be a good idea to look at Valve vmts of new Player Models inside the vpk files, to get better understanding how to structure your Character shader vmt.


Supported Parameters

Textures & Masks

$basetexture
Diffuse mask.
$bumpmap
Normal map.
$envmap
Specular reflection mask.
$masks1
Red channel - $rimlight mask
Green channel - Phong Albedo mask
Blue channel - $metalness mask
Alpha channel - $warpindex mask
$masks2
Red channel - Shadow saturation mask
Green channel - Angle of Anisotropy,as if the mask value > 0.the mask value * 3.14159 to get angle .
Blue channel - $envmap light scale
Alpha channel - Retroreflectivity
$phongwarptexture
Phong warp texture.
$fresnelrangestexture
BlinnPhong&AmbientReflection fresnel mapping texture

Unique Envmap Parameters

Note.pngNote:In addition to all previous VertexLitGeneric parameters.

$envmaplightscale $envmaplightscaleminmax

Unique Phong Parameters

Note.pngNote:In addition to all previous VertexLitGeneric parameters.

$phongalbedoboost

Unique Rimlight Parameters

Note.pngNote:In addition to all previous VertexLitGeneric parameters.

$rimlightalbedo $rimlighttint $fakerimboost $fakerimtint $rimhaloboost $rimhalobounds

Ambient Reflection Parameters

Note.pngNote: Ambient Reflection is similiar to rimlighting.

$ambientreflectionboost $ambientreflectionbouncecolor $ambientreflectionbouncecenter

Shadow Parameters

$shadowrimboost $shadowsaturation $shadowsaturationbounds $shadowtint $shadowcontrast

Miscellaneous Parameters

$hueshiftamount $metalness $warpindex $anisotropyamount