SurfaceGGX: Difference between revisions
Jump to navigation
Jump to search

Bug: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 ?]
Note:
Thunder4ik (talk | contribs) m (→See also: Unicodifying, replaced: See Also → See also) |
No edit summary |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{This is a|pixel shader|name=SurfaceGGX|game=Day of Infamy|game1=Insurgency}} It was first introduced in Day of Infamy and back ported to Insurgency. It supports [[Physically Based Rendering|PBR]]. | |||
{{Bug|This shader won't receive light properly from {{ent|env_projectedtexture}}s 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.}} | {{Bug|This shader won't receive light properly from {{ent|env_projectedtexture}}s 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.}} | ||
== Supported Parameters == | == Supported Parameters == | ||
{{MatParamDef|$basetexture|texture|text = Diffuse texture.}} | |||
{{MatParamDef|$bumpmap|text=Normal mapping. {{bug|hidetested=1|Animated bump maps aren't possible as the shader lacks the <code>$bumpframe</code> parameter.}} }} | |||
{{MatParamDef|$color|text=Color tinting.}} | |||
{{MatParamDef|$detail|text=Detail texturing.}} | |||
{{MatParamDef|$envmap|text=Specular reflections.}} | |||
{{MatParamDef|$alphatest|text=Alpha testing.}} | |||
=== Metalness Parameters === | === Metalness Parameters === | ||
{{MatParamDef|$metal|bool|Enables use of the green channel of <code>$phongexponenttexture</code>.}} | |||
{{MatParamDef|$phongexponenttexture|texture|Despite the name, this is a mask that defines the metalness of the material.}} | |||
=== Specular/Gloss Parameters === | === Specular/Gloss Parameters === | ||
{{MatParamDef|$pbr|bool|text=Enables PBR reflections.}} | |||
{{MatParamDef|$masks|texture|text=A mask for specular and glossiness. <code>$pbr</code> must be enabled to work.}} | |||
=== Misc. Parameters === | === Misc. Parameters === | ||
{{MatParamDef|$fuzz|bool|text=Enables a asperity/fuzz scattering pass on the material.}} | |||
{{MatParamDef|$fuzzmultiplier|float|text=Multiplier for the fuzz effect, default is 1.0.}} | |||
{{MatParamDef|$roughnessmultiplier|float|text=Multiplier for roughness. {{TODO|More detail, what is roughness?}} }} | |||
{{MatParamDef|$subsurfacescattering|bool|text=Enables subsurface scattering on the material. {{TODO|More detail.}} }} | |||
{{MatParamDef|$disableenvmap|bool|text=Enabling disables <code>$envmap</code> reflections. The shader will use <code>$envmap</code> by default even if it isn't specified, unless this is enabled.}} | |||
== Configuring the masks == | == Configuring the masks == | ||
Latest revision as of 00:25, 25 September 2025
SurfaceGGX is a Pixel shader available in
Day of Infamy and
Insurgency. It was first introduced in Day of Infamy and back ported to Insurgency. It supports PBR.
Supported Parameters
Diffuse texture.
$bumpmap <void>
Normal mapping.
Bug:Animated bump maps aren't possible as the shader lacks the
$bumpframe parameter.$color <void>
Color tinting.
$detail <void>
Detail texturing.
$envmap <void>
Specular reflections.
$alphatest <void>
Alpha testing.
Metalness Parameters
Despite the name, this is a mask that defines the metalness of the material.
Specular/Gloss Parameters
Misc. Parameters
Multiplier for the fuzz effect, default is 1.0.
Multiplier for roughness.
Todo: More detail, what is roughness?
Enables subsurface scattering on the material.
Todo: More detail.
Enabling disables
$envmap reflections. The shader will use $envmap by default even if it isn't specified, unless this is enabled.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.
$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.