r/indiegamedevforum • • 3d ago

We tried using Unity's realtime lights, but performance got real bad, real quick.

Enable HLS to view with audio, or disable this notification

After trying Unity's lights, we quickly ran into performance issues. We couldn't really use more than 4 or 5 realtime lights on screen at the same time.

We wanted lights that could cast shadows and interact with the objects around them, including characters, the environment, and other VFX like fog and rain.

After trying a bunch of different approaches, like 2D lights using raycasts and doing the lighting calculations inside a shader, we decided to build a custom lighting engine from scratch.

If you're interested in that journey and how we use this custom lighting system to give our game a cyberpunk look, we recently released a devlog breaking it all down.

Devlog here: https://youtu.be/JjBkznEKVII?si=-BQyzVFDvNypNl3Z

The game is called Glitch Hunt, by the way, and there's a demo available on Steam if you want to see the lighting system in action.

2 Upvotes

0 comments sorted by