The Crypt - Lighting Demo
This is a prototype for a 2D Global Illumination engine, made in Unity. It shows a spooky ambient graveyard with an underground crypt, filled with different props and lighting effects to test out the engine.
Controls:
- Press numbers 1-9 to visit different scene setups
- Left Click on elements to interact with them
- Left Click on the sky and drag to control brightness and time of day
- Right Click to cast light where the mouse is
- Tab to bring up the debug menu to tweak various options
Running on a relatively powerful GPU recommended, press Tab and turn down the Ray Count if you are experiencing framerate issues.
Renderer Features:
- Every pixel can cast and receive lighting
- Works with regular Sprite Renderers and BiRP, very easy to integrate.
- Bounce-lighting, light that is cast onto surface pixels will re-emit, tinted by the surface color
- Transparent-emissive materials, which emit light but don't cast shadows. Useful for particle effects like fire
- Partial-shadowing pixels which occlude only a percent of light. Useful for creating depth in the scene
- Lighting directionality is calculated per pixel, allowing normal maps to be used for increased fidelity
- Fully dynamic, no baking or setup required. Scene configuration change incurs no extra cost
Implementation Details:
Global Illumination can be prohibitively expensive for 3D games, but for low-resolution 2D games, GPUs are powerful enough nowadays that you can cast hundreds of rays per-pixel and still get full framerate. By default the demo casts 1000 rays per pixel, and the demo runs at a resolution of 320x240. The rays are accelerated by a distance-field, which is re-built each frame with the Jump Flood method.
| Published | 5 hours ago |
| Status | Prototype |
| Category | Other |
| Platforms | HTML5 |
| Rating | Rated 5.0 out of 5 stars (1 total ratings) |
| Author | BuilderBot |
| Made with | Unity, Aseprite |
| Tags | global-illumination, lighting, Spooky |
| Average session | A few seconds |
| Languages | English |
| Inputs | Mouse |
| Accessibility | Textless |

Leave a comment
Log in with itch.io to leave a comment.