An asynchronous, CPU-based, 2D dynamic lighting library for projects that use the Allegro graphics library. To utilize the library you add LightSources (sun, flash lights, lanterns) and LightBlockers (lines that block the rays of light). The LightSource draw method has a time complexity of O(nk) where n is the number of LightBlocker end points and k is the precision of the angle (in bytes). LightSoures can be processed on individual threads and can run in parrallel with the main thread.
Lighting system implemented in a small platformer with no Gaussain Blur.
Now with two passes of Gaussian Blur.
Clone repository with --recurse-submodules
Requirements: Allegro (5.2.4)
- Installing Allegro
- Windows:
- Ubuntu:
- Install Allegro5 Package with this guide
mkdir build
cd build
cmake .. -G "Visual Studio 15 2017" -A x64 -T host=x64 -Dexamples=ON #For Ubuntu don't include -G option
Run make or build the solution
Set Example1 as Startup Project after building on Visual Studio
- If using Visual Studio, make sure all projects are using /MT runtime linking and Basic Runtime Checks is set to default.