$specmap texture: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added ent tmp, fixed my old english)
Line 75: Line 75:


== See also ==
== See also ==
* [[$phong]] (for diffuse reflection)
* {{ent|$moss_enable}} - moss shader.
* {{ent|newLight_Point}}
* {{ent|$pomscale}} - parallax occlusion mapping shader.
* {{ent|newLight_Spot}}
* {{ent|$pomscale}} - parallax occlusion mapping shader.
* {{ent|NewLights_settings}}
* {{ent|$halflambert_gbuffer_off}} - gbuffer's halflambert option.
* {{ent|env_cascade_light}}
* {{ent|newLight_Dir}} - directional sun light with godrays only.
* {{ent|light_environment}}
* {{ent|NewLights_Spawner}} - spawner of deferred point lights.
* [[Advanced Lighting]]
* {{ent|env_lensflare}} - cinematic dynamic lens flare.
* [[Effect flags]] (dynamic light effects)
* {{ent|newLight_Spot}} - spot deferred light entity.
* [https://chetanjags.wordpress.com/2023/07/18/blackmesa-xenengine-part-4-lighting-shadows/ BlackMesa XenEngine: Part 4 – Lighting & Shadows] (page from Black Mesa developer about new lights)
* {{ent|newLights_settings}} - entity that changes deferred light settings.
* [https://chetanjags.wordpress.com/2023/07/11/blackmesa-xenengine-part2-how-a-frame-is-rendered/ BlackMesa XenEngine: Part2 – How a Frame is Rendered] (page from Black Mesa developer about how a frame rendered, include Godrays.)
* {{ent|godrays_settings}} - entity that changes godrays settings.
* [https://chetanjags.wordpress.com/2022/06/01/blackmesa-xenengine-part1-a-heavily-modified-source-engine/ BlackMesa XenEngine: Part1 – Heavily Modified Source Engine] (page from Black Mesa developer about Black Mesa engine, better known as [[XenEngine]])
* {{ent|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.
* [https://chetanjags.wordpress.com/2023/07/18/blackmesa-xenengine-part-4-lighting-shadows/ BlackMesa XenEngine: Part 4 – Lighting & Shadows] - page from Chetan (lead programmer for Black Mesa) about new lights.
* [https://chetanjags.wordpress.com/2023/07/11/blackmesa-xenengine-part2-how-a-frame-is-rendered/ BlackMesa XenEngine: Part2 – How a Frame is Rendered] - page from Chetan (lead programmer for Black Mesa) about how a frame is rendered.
* [https://chetanjags.wordpress.com/2022/06/01/blackmesa-xenengine-part1-a-heavily-modified-source-engine/ BlackMesa XenEngine: Part1 – Heavily Modified Source Engine] page from Chetan (lead programmer for Black Mesa) about {{xe|4}}.

Revision as of 13:18, 30 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 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.

Confirm:Is the this is full ?
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.
Note.pngNote:Doesn't work with $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 (use full screen mode to watch).
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