$specmap texture: Difference between revisions
MyGamepedia (talk | contribs) No edit summary |
SirYodaJedi (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
{{langsp}} | {{langsp}} | ||
[[File:NewSpecular.png| thumb | right | [[File:NewSpecular.png|thumb|right|New specular shader, example in <code>bs_c3m0d</code>. You can see how the floor reflects the red light source, the same for the floodlight.]] This shader using for surfaces to give PBR style shiny speculars. For models this shader enables with [[phong]] shader automatically, for world geometry you're need to add some specific parameters to make it working. This shader work ''only'' with deferred rendering lighting entities which support and use <code>SpecularMultiplier</code> parametr (in the game code or as kayvalue), the entities is: [[NewLight_Point]], [[NewLight_Spot]], [[npc_zombie_hev]], [[prop_barrel_cactus]], [[prop_barrel_cactus_semilarge]], [[prop_barrel_interloper]], [[prop_barrel_interloper_small]], [[env_cascade_light]]. | ||
{{ModernConfirm|Is this full list of entities ?}} | {{ModernConfirm|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.}} | {{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.}} | ||
Line 57: | Line 56: | ||
====World geometry doesn't work with [[env_cascade_light]]==== | ====World geometry doesn't work with [[env_cascade_light]]==== | ||
Unlike models - speculars doesn't work with [[env_cascade_light]] for world geometry. | Unlike models - speculars doesn't work with [[env_cascade_light]] for world geometry. | ||
<gallery mode= | <gallery mode=nolines heights=256px widths=384px> | ||
File: WGDWECL.png | | File: WGDWECL.png|{{nbsp}} | ||
</gallery> | </gallery> | ||
Line 72: | Line 71: | ||
************************************************* | ************************************************* | ||
</nowiki>}} | </nowiki>}} | ||
<gallery mode= | <gallery mode=nolines heights=256px widths=384px> | ||
File: HAHAHAHAHAHAHAHAAH.png | | File: HAHAHAHAHAHAHAHAAH.png|{{nbsp}} | ||
</gallery> | </gallery> | ||
Revision as of 09:52, 14 January 2024


This shader using for surfaces to give PBR style shiny speculars. For models this shader enables with phong shader automatically, for world geometry you're need to add some specific parameters to make it working. 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, prop_barrel_cactus, prop_barrel_cactus_semilarge, prop_barrel_interloper, prop_barrel_interloper_small, env_cascade_light.


Parameters and Effects
$specmap_texture
$specularcolor
$specmap_mode
$speculargloss
Issues
World geometry doesn't work with env_cascade_light
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:
See also
- $phong (for diffuse reflection)
- newLight_Point
- newLight_Spot
- NewLights_settings
- env_cascade_light
- light_environment
- Advanced Lighting
- Effect flags (dynamic light effects)
- BlackMesa XenEngine: Part 4 – Lighting & Shadows (page from Black Mesa developer about new lights)
- BlackMesa XenEngine: Part2 – How a Frame is Rendered (page from Black Mesa developer about how a frame rendered, include Godrays.)
- BlackMesa XenEngine: Part1 – Heavily Modified Source Engine (page from Black Mesa developer about Black Mesa engine, better known as Xenengine)