$halflambert: Difference between revisions
Jump to navigation
Jump to search

Important:Since
Source 2007, half-lambertian lighting is forcibly enabled on
) is enabled.
Important:Not designed for static props:
m (Replacing with "This is a" template) |
SirYodaJedi (talk | contribs) (Even if you disable per-vertex lighting, the $halflambert will still look out of place on static props) |
||
Line 4: | Line 4: | ||
{{This is a|shader parameter|name=$halflambert|shader=VertexLitGeneric|shader1=Teeth|shader2=EyeRefract|shader3=VortWarp|shader4=Infected (shader)}} It is a boolean parameter that enables [[Half Lambert|half-lambertian]] lighting, which wraps lighting further around a model to prevent it from losing definition. It only works on models. | {{This is a|shader parameter|name=$halflambert|shader=VertexLitGeneric|shader1=Teeth|shader2=EyeRefract|shader3=VortWarp|shader4=Infected (shader)}} It is a boolean parameter that enables [[Half Lambert|half-lambertian]] lighting, which wraps lighting further around a model to prevent it from losing definition. It only works on models. | ||
{{ | {{important|Since {{src07|4}}, half-lambertian lighting is forcibly enabled on <code>VertexLitGeneric</code> regardless of <code>$halflambert</code> setting when {{ent|$phong}} is enabled, unless <code>$phongdisablehalflambert</code>{{as|since}} is enabled.}} | ||
{{note|This parameter is disabled since {{csgo}} due to conflicts with cascade shadow mapping.}} | {{note|This parameter is disabled since {{csgo}} due to conflicts with cascade shadow mapping.}} | ||
{{important|Does not work on [[static prop]]s which have lighting baked [[VHV|per-vertex]] or [[PPL|into lightmaps]] in stock [[VRAD]]; this could be achieved with a custom VRAD. }} | {{important|Not designed for static props: | ||
* Does not work on [[static prop]]s which have lighting baked [[VHV|per-vertex]] or [[PPL|into lightmaps]] in stock [[VRAD]]; this could be achieved with a custom VRAD. | |||
* Shadows cast by static props will always be full-lambertian. This could potentially be worked around by using an {{cmd|%alphatexture}} with half opacity. | |||
}} | |||
==Syntax== | ==Syntax== |
Revision as of 08:22, 9 April 2025


$halflambert
is a material shader parameter for the VertexLitGeneric, Teeth, EyeRefract, VortWarp, and Infected (shader) shader available in all Source games. It is a boolean parameter that enables half-lambertian lighting, which wraps lighting further around a model to prevent it from losing definition. It only works on models.


VertexLitGeneric
regardless of $halflambert
setting when $phong is enabled, unless $phongdisablehalflambert
(in all games since 

- Does not work on static props which have lighting baked per-vertex or into lightmaps in stock VRAD; this could be achieved with a custom VRAD.
- Shadows cast by static props will always be full-lambertian. This could potentially be worked around by using an %alphatexture with half opacity.
Syntax
$halflambert 1