$halflambert: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Reverted note; $halflambert works in L4D2, and in ASW and P2, otherwise $phongdisablehalflambert wouldn't exist. CSGO code comment: "Disabling half-lambert for CSGO (not 'compatible' with CSM's - fixes bad shadow aliasing on viewmodels in particular)")
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)]]
{{Shaderparam|$halflambert|shader1=VertexLitGeneric|shader2=Teeth|shader3=EyeRefract|shader4=VortWarp|shader5=Infected}} 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.
{{Shaderparam|$halflambert|shader1=VertexLitGeneric|shader2=Teeth|shader3=EyeRefract|shader4=VortWarp|shader5=Infected}} 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.


{{note|Since [[Source 2007]], half-lambertian lighting is forcibly enabled on <code>VertexLitGeneric</code> 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 forcibly enabled on <code>VertexLitGeneric</code> regardless of <code>$halflambert</code> setting when {{ent|$phong}} is enabled, unless <code>$phongdisablehalflambert</code>{{AS add}} is enabled.}}
{{note|This parameter is disabled since {{l4d2}} due to conflicts with cascade shadow mapping.}}
{{note|This parameter is disabled since {{csgo}} due to conflicts with cascade shadow mapping.}}


==Syntax==
==Syntax==

Revision as of 23:30, 10 October 2021

Lambertian (left) and Half Lambertian (right)

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

Note.pngNote:Since Source 2007, half-lambertian lighting is forcibly enabled on VertexLitGeneric regardless of $halflambert setting when $phong is enabled, unless $phongdisablehalflambertTemplate:AS add is enabled.
Note.pngNote:This parameter is disabled since Counter-Strike: Global Offensive due to conflicts with cascade shadow mapping.

Syntax

$halflambert 1