Language subpage
This subpage is used on the $specmap texture page to display content in English.
If you have edited the language subpage, do not forget to purge the base page by clicking on the button on the right. Otherwise, its contents will not be updated.
This article or section needs to be cleaned up to conform to a higher standard of quality because:grammar
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
New specular shader, example in
bs_c3m0d
. You can see how the floor reflects the red light source, the same for the floodlight.
$specmap_texture
is a material shader parameter available in Black Mesa. This shader is used for surfaces to give PBR style shiny speculars. Works with VertexLitGeneric and LightmappedGeneric. This shader work only with deferred rendering lighting entities which support and use SpecularMultiplier
parametr (in the game code or as kayvalue), the entities is: NewLight_Point, NewLight_Spot, npc_zombie_hev (flashlight), prop_barrel_cactus, prop_barrel_cactus_semilarge, prop_barrel_interloper, prop_barrel_interloper_small, env_cascade_light, bmortar, npc_plantlight, npc_plantlight_stalker, player (flashlight).
Confirm: Is this full list of entities ?
Warning: This is pretty expensive shader for video cards, in large quantities may not cause optimization problems, but it will heat up your video card very much. Use wisely.
Parameters and Effects
Controls the color and saturation of the specularity. If all three values are the same - the color obtained from deferred rendering light source will be used.
Defines style and behaviour for speculars, there are 3 available values - 0, 1 and 2.
Examples.
$specmap_mode - 0. Seems to ignore $specmap_texture.
$specmap_mode - 1. Seems to use $specmap_texture as glossiness map.
$specmap_mode - 2. Seems to use $specmap_texture as tint map.
|
Defines gloss scale. Works differently depending on
$specmap_mode
value.
Examples.
$specmap_mode - 0. $speculargloss - 10
$specmap_mode - 0. $speculargloss - 100
$specmap_mode - 0. $speculargloss - 500
$specmap_mode - 1. $speculargloss - 10
$specmap_mode - 1. $speculargloss - 100
$specmap_mode - 1. $speculargloss - 500
$specmap_mode - 2. $speculargloss - 10
$specmap_mode - 2. $speculargloss - 100
$specmap_mode - 2. $speculargloss - 500
|
Bugs/Limitations
Unlike models - speculars doesn't work with env_cascade_light for world geometry.
Fullbright glitch with $specmap_mode
If values are used in $specmap_mode that were not thought out for use - surface will get fullbright and you'll get message in the console:
*************************************************
Shader 'shaders\fxc\gbbrush_ps30.vcs' - Couldn't load combo 184025856 of shader (dyn=384)
static combos: BASETEXTURE2=0 BUMPMAP=1 BUMPMAP2=0 CUBEMAP=0 ENVMAPMASK=0 BASEALPHAENVMAPMASK=0 SELFILLUM=0 NORMALMAPALPHAENVMAPMASK=0 WARPLIGHTING=0 FANCY_BLENDING=0 SEAMLESS=0 DETAIL_BLEND_MODE=0 MOSS=0 NEW_SPECMAP=0 SHADER_SPECIAL_MODE=0
*************************************************
*************************************************
Shader 'shaders\fxc\gbbrush_gbuffer_ps30.vcs' - Couldn't load combo 48 of shader (dyn=4)
static combos: ALPHACLIP=0 NEW_SPECMAP=0
*************************************************
See also