WorldGGX: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Forgot type for $lumroughness.)
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 4: Line 4:


== Supported Parameters ==
== Supported Parameters ==
;{{MatParam|[[$basetexture]]|to=$basetexture2||Diffuse texture.}}
{{MatParamDef|$basetexture|to=$basetexture2||Diffuse texture.}}
;{{MatParam|[[$bumpmap]]|to=$bumpmap2||Normal mapping. {{bug|Animated bump maps aren't possible as the shader lacks the $bumpframe parameter.}} }}
{{MatParamDef|$bumpmap|to=$bumpmap2||Normal mapping. {{bug|hidetested=1|Animated bump maps aren't possible as the shader lacks the $bumpframe parameter.}} }}
;{{MatParam|[[$color#Models|$color2]]||Color tinting.}}
{{MatParamDef|$color2||Color tinting.}}
;{{MatParam|[[$detail]]||Detail texturing.}}
{{MatParamDef|$detail||Detail texturing.}}
;{{MatParam|[[$envmap]]||Specular reflections.}}
{{MatParamDef|$envmap||Specular reflections.}}
;{{MatParam|[[$blendmodulatetexture]]||Modulation texture for Displacement blending.}}
{{MatParamDef|$blendmodulatetexture||Modulation texture for Displacement blending.}}


=== Blend Mapping Parameters ===
=== Blend Mapping Parameters ===


;{{MatParam|$blendmap|to=$blendmap2|texture|Blend map to use for specular and parallaxing (if $parallax is 1).  Can also take a height map.}}
{{MatParamDef|$blendmap|to=$blendmap2|texture|Blend map to use for specular and parallaxing (if $parallax is 1).  Can also take a height map.}}
;{{MatParam|$heightscale|to=$heightscale2|float|A scalar for the $blendmap(2)'s parallax effect.}}
{{MatParamDef|$heightscale|to=$heightscale2|float|A scalar for the $blendmap(2)'s parallax effect.}}
;{{MatParam|$heightblend|bool|Enabling allows use of $blendmap and $blendmap2.}}
{{MatParamDef|$heightblend|bool|Enabling allows use of $blendmap and $blendmap2.}}
;{{MatParam|$heightblendoffset|float|Offsets the blend map, default is 0.5.}}
{{MatParamDef|$heightblendoffset|float|Offsets the blend map, default is 0.5.}}
;{{MatParam|$parallax|bool|Enabling uses the blend map as a height map for a parallax effect.}}
{{MatParamDef|$parallax|bool|Enabling uses the blend map as a height map for a parallax effect.}}
;{{MatParam|$selfshadow|bool|Enabling creates ambient occlusion around the parallax effect.}}
{{MatParamDef|$selfshadow|bool|Enabling creates ambient occlusion around the parallax effect.}}


=== Misc. Parameters ===
=== Misc. Parameters ===


;{{MatParam|$roughnessmultiplier|float|Multiplier for roughness.  {{TODO|More detail, what is roughness?}} }}
{{MatParamDef|$roughnessmultiplier|float|Multiplier for roughness.  {{TODO|More detail, what is roughness?}} }}
;{{MatParam|$lumroughness|bool|Enabling makes use of the luminance to affect the roughness, default is 0. {{TODO|More detail, luminance of the $basetexture?}} }}
{{MatParamDef|$lumroughness|bool|Enabling makes use of the luminance to affect the roughness, default is 0. {{TODO|More detail, luminance of the $basetexture?}} }}


== See Also ==
== See also ==
*{{ent|SurfaceGGX}}, similar shader used for models.
*{{ent|SurfaceGGX}}, similar shader used for models.

Latest revision as of 11:49, 23 August 2025

WorldGGX 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. Displacement blending similar to WorldVertexTransition is supported.

Icon-Bug.pngBug:This shader won't receive light from env_projectedtextures like the player's flashlight. If the player is allowed to use a flashlight, the best case scenario is to only use this shader on materials in lit up areas.  [todo tested in ?]

Supported Parameters

Diffuse texture.
$bumpmap to $bumpmap2 <void>
Normal mapping.
Icon-Bug.pngBug:Animated bump maps aren't possible as the shader lacks the $bumpframe parameter.
$color2 <void>
Color tinting.
$detail <void>
Detail texturing.
$envmap <void>
Specular reflections.
Modulation texture for Displacement blending.

Blend Mapping Parameters

Blend map to use for specular and parallaxing (if $parallax is 1). Can also take a height map.
A scalar for the $blendmap(2)'s parallax effect.
Enabling allows use of $blendmap and $blendmap2.
Offsets the blend map, default is 0.5.
Enabling uses the blend map as a height map for a parallax effect.
Enabling creates ambient occlusion around the parallax effect.

Misc. Parameters

Multiplier for roughness.
Todo: More detail, what is roughness?
Enabling makes use of the luminance to affect the roughness, default is 0.
Todo: More detail, luminance of the $basetexture?

See also