Skip to content

nadir500/Half-Lambert-Unity2020LTS

Repository files navigation

Half-Lambert-Unity2020LTS

Half lambert lighting model using Unity 2020LTS with URP optimized for mobile.

Introduction:

"Half Lambert" lighting is a technique first developed in the original Half-Life. It is designed to prevent the rear of an object losing its shape and looking too flat. 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, thus our values would be like this:

chart_HL

Half Lambert is a completely non-physical technique and gives a purely percieved visual enhancement and is an example of a forgiving lighting model, reaching the result the same as in the following figure:

alyx

Results in Unity:

patrick

TODO:

  • Add bake HL lighting model for static objects.
  • Add additional lights interaction(baked/real-time).
  • Add more rendering stages for constant ambient, ambient cube as the following: acm paper

SIGGRAPH06 article Shading in valve's source engine is the main inspiration for the project to reach the final results and deploy the lighting model for different cartoonish styles in different lighting conditions.

Related Links:

  • 3D model by ChicaKnowsFNAF Link
  • SIGGRAPH06 article Link

About

Half lambert lighting model using Unity 2020LTS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published