SurfaceGGX: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added SurfaceGGX.)
 
m (→‎See also: Unicodifying, replaced: See Also → See also)
Line 58: Line 58:
<code>$pbr</code> must be enabled to make use of <code>$masks</code>.
<code>$pbr</code> must be enabled to make use of <code>$masks</code>.


== See Also ==
== See also ==
*{{ent|WorldGGX}}, similar shader used for brushes and displacements.
*{{ent|WorldGGX}}, similar shader used for brushes and displacements.

Revision as of 13:41, 8 January 2024

SurfaceGGX is a material shader available in the following Source engine games: Day of Infamy Day of Infamy , Insurgency Insurgency . It was first introduced in Day of Infamy and back ported to Insurgency. It supports PBR.

Icon-Bug.pngBug:This shader won't receive light properly from env_projectedtextures like the player's flashlight, instead making the material appear pure black. If the player is allowed to use a flashlight, the best case scenario is to only use this shader on props in lit up areas. This shader applied to weapon view models is safe from this however.  [todo tested in ?]

Supported Parameters

[[$basetexture|$basetexture]]
[[$bumpmap|$bumpmap]]
[[$color2|$color2]]
[[$detail|$detail]]
[[$envmap|$envmap]]
[[$alphatest|$alphatest]]

Metalness Parameters

$metal
$phongexponenttexture

Specular/Gloss Parameters

$pbr
$masks

Misc. Parameters

$fuzz
$fuzzmultiplier
$roughnessmultiplier
$subsurfacescattering
$disableenvmap

Configuring the masks

$phongexponenttexture

The RGB channels of $phongexponenttexture is configured as follows:

Channel Data
Red Glossiness (roughness inverted)
Green Metalness inverted
Blue Sub-surface scattering mask

$metal must be set to 1 in order to use the green channel.

Note.pngNote:$fuzz and $detailnormal use the inverse of the blue channel.

$masks

The RGB and alpha channels of $masks is configured as follows:

Channel Data
RGB Specular tint
Alpha Glossiness

$pbr must be enabled to make use of $masks.

See also

  • WorldGGX, similar shader used for brushes and displacements.