$specmap texture: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Very small amount of issue. Put them in main page section.)
Line 9: Line 9:


{{bug|hidetested=1|If [[$alphatest|alpha tested]] material has a specular, and beneath it, there is also a material with the same shader, and in combination with new lights or a flashlight, this all will cause artifacts appear. This occurred after Crowbar Collective fixed the outline artifacts for alpha tested materials. [https://youtu.be/cb6Fw4rVXXo Example].}}
{{bug|hidetested=1|If [[$alphatest|alpha tested]] material has a specular, and beneath it, there is also a material with the same shader, and in combination with new lights or a flashlight, this all will cause artifacts appear. This occurred after Crowbar Collective fixed the outline artifacts for alpha tested materials. [https://youtu.be/cb6Fw4rVXXo Example].}}
{{note|{{ent|env_cascade_light}} doesn't work with this shader (at least on [[Bmodel|bmodels]] and world geometry ).}}
{{back | Black Mesa Level Creation}}
{{back | Black Mesa Level Creation}}


Line 69: Line 71:
{{todo|Check to see if parameters such as {{code|$envmapmask}} or {{code|$basealphaenvmapmask}} and others affect newlight specular.}}
{{todo|Check to see if parameters such as {{code|$envmapmask}} or {{code|$basealphaenvmapmask}} and others affect newlight specular.}}
}}
}}
==Bugs/Limitations==
====World geometry doesn't work with [[env_cascade_light]]====
Unlike models - speculars doesn't work with [[env_cascade_light]] for world geometry.
<gallery mode=nolines heights=256px widths=384px>
File: WGDWECL=.jpg|{{nbsp}}
</gallery>
====Fullbright glitch with <code>$specmap_mode</code>====
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:
{{CodeBlock|<nowiki>*************************************************
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
*************************************************
</nowiki>}}
<gallery mode=nolines heights=256px widths=384px>
File: HAHAHAHAHAHAHAHAAH=.jpg|{{nbsp}}
</gallery>


== See also ==
== See also ==

Revision as of 11:26, 5 January 2025

English (en)Translate (Translate)
Broom icon.png
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.

$specmap_texture is a material shader parameter available in Black Mesa Black Mesa.

New specular shader, example in bs_c3m0d. You can see how the floor reflects the red light source, the same for the floodlight.

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.pngWarning: This shader is pretty expensive for GPU. May not cause FPS drops, but it will heat up your GPU very much. Use wisely.
Icon-Bug.pngBug:Doesn't work with VertexLitGeneric if $phong is enabled.
Icon-Bug.pngBug:If alpha tested material has a specular, and beneath it, there is also a material with the same shader, and in combination with new lights or a flashlight, this all will cause artifacts appear. This occurred after Crowbar Collective fixed the outline artifacts for alpha tested materials. Example.
Note.pngNote:env_cascade_light doesn't work with this shader (at least on bmodels and world geometry ).
Black Mesa Level Creation

Parameters and Effects

$specmap_texture $specularcolor $specmap_mode $speculargloss $normalmapalphaenvmapmask

See also