#gamedev #bevy #rustlang
Last week I decided to spend a week of my free time trying to figure out how to write a 2d lighting system for the Bevy Game Engine. I decided to do this mainly because without any kind of lighting, my games seemed kind of flat and less visually appealing than I hoped they would be. In this video I built a wgsl compute shader based lighting system which supports point lights and physically based sprite lights by applying a lighting mask texture to a render texture of the scene. Point lights should be self explanatory but I was also able to implement physically accurate sprite lights which shoot rays of light that can be interactively blocked by the player sprite or terrain tiles. Overall, I learned a lot from this experience and hope to spruce up the lighting system so that I can use it in future projects more comfortably and robustly.
I Spent 1 Week Learning to Code 2D Lighting with Bevy & Rust
Join my Discord!
/ discord
Timestamps
0:00 - Intro
0:34 - Demo Scene Setup
1:04 - Pre Development Brainstorming
2:00 - Quick Compute Shader Explanation
3:23 - Light Mask Explanation
3:50 - Point Light Shader
5:17 - Sprite Light Shader
7:30 - Outro
Music
Marshmellow - Lukrembo
Link : • lukrembo - marshmallow
Onion - Lukrembo
Link: • lukrembo - onion
Better Days - LAKEY INSPIRED
Link : • LAKEY INSPIRED - Better Days