Half Lambert: Difference between revisions
SirYodaJedi (talk | contribs) m (→Implementation: shader flag link) |
Thunder4ik (talk | contribs) m (→See also: clean up, replaced: See Also → See also) |
||
Line 16: | Line 16: | ||
In {{src|4.1}}, Half Lambert lighting can most often be seen being used on the characters face materials. It is enabled by the use of {{mono|[[$halflambert]]}} within a material's [[VMT]] file. | In {{src|4.1}}, Half Lambert lighting can most often be seen being used on the characters face materials. It is enabled by the use of {{mono|[[$halflambert]]}} within a material's [[VMT]] file. | ||
==See | ==See also== | ||
* [[$halflambert]] - [[VMT]] shader parameter to enable Half-Lambert lighting. | * [[$halflambert]] - [[VMT]] shader parameter to enable Half-Lambert lighting. | ||
Revision as of 12:50, 4 January 2024
Half Lambert lighting is a technique designed to prevent the rear of an object losing its shape and looking too flat.
Half Lambert is a completely non-physical technique[Clarify] and gives a purely percieved visual enhancement and is an example of a forgiving lighting model.
Games
Implementation
To soften the diffuse contribution from local lights, the dot product from the Lambertian model is scaled by ½, add ½ and squared. The result is that this dot product, which normally lies in the range of -1 to +1, is instead in the range of 0 to 1 and has a more pleasing falloff.
In the original Half-Life, where this diffuse Half Lambert term was the only term in most of the model lighting, it kept the characters in particular from being lit exclusively by a constant ambient term on the back side with respect to a given light source.
In Source, Half Lambert lighting can most often be seen being used on the characters face materials. It is enabled by the use of $halflambert within a material's VMT file.
See also
- $halflambert - VMT shader parameter to enable Half-Lambert lighting.