$halflambert: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (page is full of links)
(Fixed with Necro Patch.)
Line 6: Line 6:
{{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|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|In {{bms|4}} half-lambertian for [[NewLight Point|new light]] is broken. The result is that meshes with [[$phong]] or [[$halflambert]] get lit from ALL sides perpendicular to newlights, including ones with opposing normals. If you want to use [[$phong]] or [[$halflambert]] - you are able to fix this with adding in your [[VMT]] material parameter <code>"$halflambert_gbuffer_off"    "1"</code>.}}


==Syntax==
==Syntax==


  $halflambert 1
  $halflambert 1

Revision as of 22:16, 29 April 2024

English (en)Translate (Translate)
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 Source 2007, half-lambertian lighting is forcibly enabled on VertexLitGeneric regardless of $halflambert setting when $phong is enabled, unless $phongdisablehalflambert(in all games since Alien Swarm) is enabled.
Note.pngNote:This parameter is disabled since Counter-Strike: Global Offensive due to conflicts with cascade shadow mapping.
Icon-Important.pngImportant: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.

Syntax

$halflambert 1