$specmap texture: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 25: Line 25:
{{expand|title=Examples.|
{{expand|title=Examples.|
<br>
<br>
<gallery mode=packed heights=410px>
<gallery mode=packed heights=290px>
File:1 1 1=.jpg|$specularcolor - 1 1 1.
File:1 1 1=.jpg|$specularcolor - 1 1 1.
File:1 0 0=.jpg|$specularcolor - 1 0 0.
File:1 0 0=.jpg|$specularcolor - 1 0 0.
Line 35: Line 35:
{{expand|title=Examples.|
{{expand|title=Examples.|
<br>
<br>
<gallery mode=packed heights=410px>
<gallery mode=packed heights=290px>
File:mode 0=.jpg|$specmap_mode - 0. Seems to ignore $specmap_texture.
File:mode 0=.jpg|$specmap_mode - 0. Seems to ignore $specmap_texture.
File:mode 1=.jpg|$specmap_mode - 1. Seems to use $specmap_texture as glossiness map.
File:mode 1=.jpg|$specmap_mode - 1. Seems to use $specmap_texture as glossiness map.
Line 45: Line 45:
{{expand|title=Examples of $specmap_mode - 0.|
{{expand|title=Examples of $specmap_mode - 0.|
<br>
<br>
<gallery mode=packed heights=610px>
<gallery mode=packed heights=290px>
File:mode 0 10=.jpg|$specmap_mode - 0. $speculargloss - 10
File:mode 0 10=.jpg|$specmap_mode - 0. $speculargloss - 10
File:mode 0 100=.jpg|$specmap_mode - 0. $speculargloss - 100
File:mode 0 100=.jpg|$specmap_mode - 0. $speculargloss - 100
Line 53: Line 53:
{{expand|title=Examples of $specmap_mode - 1.|
{{expand|title=Examples of $specmap_mode - 1.|
<br>
<br>
<gallery mode=packed heights=610px>
<gallery mode=packed heights=290px>
File:mode 1 10=.jpg|$specmap_mode - 1. $speculargloss - 10
File:mode 1 10=.jpg|$specmap_mode - 1. $speculargloss - 10
File:mode 1 100=.jpg|$specmap_mode - 1. $speculargloss - 100
File:mode 1 100=.jpg|$specmap_mode - 1. $speculargloss - 100
Line 61: Line 61:
{{expand|title=Examples of $specmap_mode - 2.|
{{expand|title=Examples of $specmap_mode - 2.|
<br>
<br>
<gallery mode=packed heights=610px>
<gallery mode=packed heights=290px>
File:mode 2 10=.jpg|$specmap_mode - 2. $speculargloss - 10
File:mode 2 10=.jpg|$specmap_mode - 2. $speculargloss - 10
File:Mode_2=.jpg|$specmap_mode - 2. $speculargloss - 100
File:Mode_2=.jpg|$specmap_mode - 2. $speculargloss - 100

Revision as of 13:09, 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 ?
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 (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