For more information, see http://thecode.cafe/posts/lighting-2d.
Learn to use this lighting system with Shaun Spalding: https://www.youtube.com/watch?v=RFRV3lhVOhg
This is a real-time and lightweight shader lighting system for dynamic pixel lights that composites multiple lights into a single surface. The surface is fitted to a "camera" that is used to perform the lighting pass.
Instances that inherit from the object
obj_shadow_caster are able to cast shadows, and lights are placed and configured in the game with instances of
obj_light. It has good support for object variables.
It is my desire to provide a general lighting system that could be further customized to suit the needs of each specific game project it is used in. To get the best performance, or lighting quality, or whatever else, for your game you will probably end up modifying it to some extent. It might also work well for your game or prototype out-of-the-box by tweaking some of the knobs.
You can easily upgrade the lighting system, once integrated in your game, to a newer version by simply replacing the previous version's assets in your project. It also tracks various statistics (if you opt in) that help you optimize your use of the system.
The repository is hosted on GitHub and is available here: https://github.com/borup3/Lighting-System-2D.
The demo project repository is also hosted on GitHub and is available here: https://github.com/borup3/Lighting-System-2D-Demos.
Lights are defined as a set of attributes that determine their behavior, so they are decoupled from the object that created them. These attributes include spatial information, rendering attributes like color, range and intensity and what type of light to use.
The following light types are supported at the time of writing:
PointOmnidirectional point emitter
SpotConical point emitter
AreaUnidirectional line emitter
LineBidirectional line emitter
DirectionalInfinite directional light without an emitter source
These light types give you a lot of possibilities for lighting up your game worlds.
Version 1.0.0. Published January 16, 2019
You can only review assets you've bought.
This looks SO cool, but does not work on Mac :( Posted a comment on Sean Spaulding's (always) brilliant turorial on the system. Seems it simply doesn't work for Mac users. REALLY hope it's fixable with a future update. Still, didn't want to bog down the review score based on something that can hopefully soon be fixed. Fingers crossed!
Hi, I'll take a look to see what's going on when I have access to a mac. It should all work fine. I'll update when the issue is fixed, if I find one.
don't work on OSX
No visible lights and shadow on Mac OS :/ Only show normal screen.
Hi Miroslaw, I'll take a look to see what's going on when I have access to a mac. It should all work fine. I'll update when the issue is fixed, if I find one.