Character (shader): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
{{wip}}
{{stub}}
[[File:character_vs_vertexlit.jpg|thumb|Character on left, VertexLitGeneric on right.]]
'''Character''' is a [[material]] [[shader]] available in {{csgo}}. Shares most generic parameters of [[VertexLitGeneric]]. Takes advantage of mask textures to tune stuff like '''rimlighting''', '''phong shading''' and other.
'''Character''' is a [[material]] [[shader]] available in {{csgo}}. Shares most generic parameters of [[VertexLitGeneric]]. Takes advantage of mask textures to tune stuff like '''rimlighting''', '''phong shading''' and other.


Line 10: Line 11:
;{{ent|$envmap}}
;{{ent|$envmap}}
: Specular reflection mask.
: Specular reflection mask.
;{{ent|$Masks1}}
;{{ent|$masks1}}
: '''Red channel''' - [[$rimlight]] mask
: '''Red channel''' - [[$rimlight]] mask
: '''Green channel''' - [[Phong]] mask
: '''Green channel''' - [[Phong]] mask
: '''Blue channel''' - Metalness mask
: '''Blue channel''' - Metalness mask
: '''Alpha channel''' - [[$warpindex]] mask
: '''Alpha channel''' - [[$warpindex]] mask
;{{ent|$Masks2}}
;{{ent|$masks2}}
: '''Red channel''' - Shadow saturation mask
: '''Red channel''' - Shadow saturation mask
: '''Green channel''' - Angle of Anisotropy
: '''Green channel''' - Angle of Anisotropy
Line 35: Line 36:
===Unique Rimlight Parameters===
===Unique Rimlight Parameters===
{{note|In addition to all previous '''VertexLitGeneric''' parameters.}}
{{note|In addition to all previous '''VertexLitGeneric''' parameters.}}
{{MatParam|$rimlightabledo|float|Rimlight albedo overbrightening factor.}}
{{MatParam|$rimlightalbedo|float|Rimlight albedo overbrightening factor.}}
{{MatParam|$rimlighttint|RGB matrix|Color tint of the rimlight.}}
{{MatParam|$rimlighttint|RGB matrix|Color tint of the rimlight.}}
{{MatParam|$fakerimboost|float|{{todo}}.}}
{{MatParam|$fakerimboost|float|{{todo}}.}}
Line 55: Line 56:
===Miscellaneous Parameters===
===Miscellaneous Parameters===
{{MatParam|$hueshiftamount|float|Changes the hue of the model.}}
{{MatParam|$hueshiftamount|float|Changes the hue of the model.}}
{{MatParam|$metalness|float|{{todo}}.}}
{{MatParam|$metalness|float|{{todo}}.
{{MatParam|$warpindex|float|Changes how much the light can spread on the model, similiar to half lambert.}}
{{note|Doesn't do anything if [[$masks1]] is used.}}}}
{{MatParam|$warpindex|float|Changes how much the light can spread on the model, similiar to half lambert.
{{note|Doesn't do anything if [[$masks1]] is used.}}}}
{{MatParam|$anisotropyamount|float|{{todo}}.}}
{{MatParam|$anisotropyamount|float|{{todo}}.}}

Revision as of 11:15, 28 February 2020

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. Takes advantage of mask textures to tune stuff like rimlighting, phong shading and other.

Supported Parameters

Textures & Masks

$basetexture
Diffuse mask.
$bumpmap
Normal map.
$envmap
Specular reflection mask.
$masks1
Red channel - $rimlight mask
Green channel - Phong mask
Blue channel - Metalness mask
Alpha channel - $warpindex mask
$masks2
Red channel - Shadow saturation mask
Green channel - Angle of Anisotropy
Blue channel - $envmap light scale
Alpha channel - Retroreflectivity
$phongwarptexture
Phong warp texture.
$fresnelrangestexture
[Todo]

Unique Envmap Parameters

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

$envmaplightscale $envmaplightscaleminmax

Phong Parameters

$phongboost $phongalbedoboost $phongtint $phongexponent

Unique Rimlight Parameters

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

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

Ambient Reflection Parameters

$ambientreflectionboost $ambientreflectionbouncecolor $ambientreflectionbouncecenter

Shadow Parameters

$shadowrimboost $shadowsaturation $shadowsaturationbounds $shadowtint $shadowcontrast

Miscellaneous Parameters

$hueshiftamount $metalness $warpindex $anisotropyamount