$specmap texture: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{langsp}} File:NewSpecular.png| thumb | right | 720px |New specular shader, example in <code>bs_c3m0d</code>. You can see how the floor reflects the red light source, the s...")
 
Line 55: Line 55:


==Issues==
==Issues==
====World geometry doesn't 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=packed heights=510px>
<gallery mode=packed heights=510px>
File: WGDWECL.png | frame | An example.
File: WGDWECL.png | frame | An example.
</gallery>
</gallery>
====Fullbright glitch with <code>$specmap_mode</code>====
====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:
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:

Revision as of 13:22, 13 January 2024

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

Template:Shaderparam 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).

Black Mesa Level Creation
Warning.pngWarning: 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.
Todo:  Add list of entities which support and use SpecularMultiplier parametr, for now known entities is NewLight_Point, NewLight_Spot and npc_zombie_hev.

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:

************************************************* 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 *************************************************

See also

Todo: Fix some stuff. May better describe functions. Investigate and document some keyvalues and functions. Clean up english. Add more issues if you'll find.