$specmap texture: Difference between revisions
MyGamepedia (talk | contribs) |
MyGamepedia (talk | contribs) No edit summary |
||
Line 8: | Line 8: | ||
{{warning|This shader is pretty expensive for GPU. May not cause FPS drops, but it will heat up your GPU very much. Use wisely.}} | {{warning|This shader is pretty expensive for GPU. May not cause FPS drops, but it will heat up your GPU very much. Use wisely.}} | ||
{{note|Doesn't work | {{note|Doesn't work if [[$phong]] is enabled.}} | ||
{{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] (use full screen mode to watch).}} | {{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] (use full screen mode to watch).}} |
Revision as of 12:10, 10 February 2025



$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 works only with deferred rendering lighting entities which are using SpecularMultiplier
parameter (in the game code or as the property), the entities are: 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).
This shader is mainly used for LightmappedGeneric, because this is the only option to have gloss effect on world geometry and bmodel. For VertexLitGeneric mainly used $phong, because new lights are also support this shader; this shader works with baked lights and have a lot of parameters.





Parameters and Effects
$specmap_texture
$specularcolor
$specmap_mode
$speculargloss
$normalmapalphaenvmapmask
See also
- $moss_enable - moss shader.
- $pomscale - parallax occlusion mapping shader.
- Lightmapped_4WayBlend - 4 way blend shader.
- $halflambert_gbuffer_off - gbuffer's halflambert option.
- newLight_Dir - directional sun light with godrays only.
- NewLights_Spawner - spawner of deferred point lights.
- env_lensflare - cinematic dynamic lens flare.
- newLight_Spot - spot deferred light entity.
- newLights_settings - entity that changes deferred light settings.
- godrays_settings - entity that changes godrays settings.
- env_cascade_light - deferred cascade sun light entity.
- New Lights Editor - in game deferred lights editor.
- Effect flags - effects flags, some of them are dynamic light effects.
- BlackMesa XenEngine: Part 4 – Lighting & Shadows - page from Chetan (lead programmer for Black Mesa) about new lights.
- BlackMesa XenEngine: Part2 – How a Frame is Rendered - page from Chetan (lead programmer for Black Mesa) about how a frame is rendered.
- BlackMesa XenEngine: Part1 – Heavily Modified Source Engine page from Chetan (lead programmer for Black Mesa) about
Xengine.