User Guide#

WebGL demo.

Video tutorial.

This document will guide you through the usage of Real Time Area Lights package. This package extends Unity’s lighting system with area light support. Here are showcases for different light type:

Polygon light:

Linear light:

Textured light:

Area Light#

Traditional lighting calculation abstracts light source as a point without volume at some position (spot light, point light, etc.) or at infinite distance (directional light). This abstraction simplify calculation for real time graphics.

However, light source in real world isn’t infinite small, the difference would become apparent when light source is relatively large. In order to achieve a visually correct result, the lighting algorithm would involve expensive method like Monte Carlo integration which is unaffordable for realtime application.

Linearly Transformed Cosines#

Linearly Transformed Cosines lead us a way to approximate area light with an anatical solution, we can get convincible result in constant time.

The author finds that we already have anatical solution for integrating a polygon on cosine spherical distribution, but cosine distribution is only correct for diffuse surfaces.

One step further, they creatively use a matrix to transform cosine distribution to physcailly based BRDFs (approximately), in other words, we can use the inverse transform to convert PBR BRDF to cosine spherical distribution, which has anatical solution.

And finally, we transform the polygon from PBR BRDF space into the cosine spherical space, do the anatical polygon integration.