$halflambert: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Rewrite to be more in line with other shader parameters)
(Changed to use Shaderparam template)
Line 1: Line 1:
[[Image:Alyx_lambert_half_lambert.jpg|right|200px|thumb|Lambertian (left) and Half Lambertian (right)]]
[[Image:Alyx_lambert_half_lambert.jpg|right|200px|thumb|Lambertian (left) and Half Lambertian (right)]]


'''<code>$halflambert</code>''' is a [[VMT]] command which enables [[Half Lambert|half-lambertian]] lighting, which wraps lighting further around a model to prevent it from losing definition. It only works on models.
{{Shaderparam|$halflambert}} It enables [[Half Lambert|half-lambertian]] lighting, which wraps lighting further around a model to prevent it from losing definition. It only works on models.


{{note|Since [[Source 2007]], this parameter is forced on regardless of <code>$halflambert</code> setting when <code>[[phong|$phong]]</code> is enabled, unless <code>$phongDisableHalfLambert</code>{{AS add}} is enabled.}}
{{note|Since [[Source 2007]], half-lambertian lighting is forced on regardless of <code>$halflambert</code> setting when <code>[[phong|$phong]]</code> is enabled, unless <code>$phongDisableHalfLambert</code>{{AS add}} is enabled.}}


==Syntax==
==Syntax==

Revision as of 16:12, 6 June 2019

Lambertian (left) and Half Lambertian (right)

Template:Shaderparam It enables half-lambertian lighting, which wraps lighting further around a model to prevent it from losing definition. It only works on models.

Note.pngNote:Since Source 2007, half-lambertian lighting is forced on regardless of $halflambert setting when $phong is enabled, unless $phongDisableHalfLambertTemplate:AS add is enabled.

Syntax

$halflambert 1