You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bevy does not yet have 2d lighting support. We want to work towards having first party support for 2d lighting that can support a multitude of styles of 2d games. The initial goal is to build out configurable point lights and shadows, while paving the way for more advanced 2d lighting features in the future.
Goal Status
This is a potential Bevy Project Goal. Its state on the Project Goals Board determines if it is Proposed, Postponed, Blocked (Approved), Unstaffed (Approved), Staffed (Approved), Completed, or Declined.
Staffing SMEs: Not yet staffed
Working Group Link: Working Group not yet formed
Design Documents: Design documents not yet written
I'm just curious here, is the more ergonomic api worth the performance tradeoff from forward rendering?
Is the philosophy from that going to be: "use bevy's 2d lighting if you want something quick and easy to use, but if you need something specific and more performant, then try one of the 3rd party crates or make your own."
My goal is for the first party system to perform well!
But you make a good point. There is a lot of elegance to the simplicity of a light map.
I'm admittedly not a rendering expert. I'm doing my best to keep up, but definitely interested to hear if this approach won't stack up performance wise.
Ergonomics is one side of it. The other bigger side of it for me, is that I'm not sure how light masks/layers would work in a world of a light map. I suppose you could compute a light map per lighting layer, though I'm not as confident in how to achieve this.
I view light layers / masks as a must have for a good 2d lighting system, which has influenced the design. I don't believe it's a feature supported by the third-party crates I've looked at.
I think forward rendering can stack up, with a little optimization.
Deferred rendering does also have its advantages especially when it comes to scenarios with alot of meshes being drawn. Maybe it's something that can also be considered in the future since 3d lighting also has forward and deferred rendering in bevy.
Light layers do seem tricky with deferred rendering though.
Activity
jgayfer commentedon Oct 7, 2026
Okay, I've drafted an initial design document: https://hackmd.io/@jgayfer/ByTHXgNjGl
The design doc links it already, but I also put up a draft PR to help visualize what the first iteration of the plan might look like: #26053
NthMetal commentedon Oct 8, 2026
I'm just curious here, is the more ergonomic api worth the performance tradeoff from forward rendering?
Is the philosophy from that going to be: "use bevy's 2d lighting if you want something quick and easy to use, but if you need something specific and more performant, then try one of the 3rd party crates or make your own."
jgayfer commentedon Oct 8, 2026
My goal is for the first party system to perform well!
But you make a good point. There is a lot of elegance to the simplicity of a light map.
I'm admittedly not a rendering expert. I'm doing my best to keep up, but definitely interested to hear if this approach won't stack up performance wise.
Ergonomics is one side of it. The other bigger side of it for me, is that I'm not sure how light masks/layers would work in a world of a light map. I suppose you could compute a light map per lighting layer, though I'm not as confident in how to achieve this.
I view light layers / masks as a must have for a good 2d lighting system, which has influenced the design. I don't believe it's a feature supported by the third-party crates I've looked at.
jgayfer commentedon Oct 8, 2026
As far as philosophy goes, ideally most people would use the first-party option.
I don't see the space for third-party or custom lighting solutions going away fully however. Some folks will want custom lighting.
Though my desire would be for a custom solution to be motivated by a specific effect, rather than a lack of first-party performance.
NthMetal commentedon Oct 10, 2026
I think forward rendering can stack up, with a little optimization.
Deferred rendering does also have its advantages especially when it comes to scenarios with alot of meshes being drawn. Maybe it's something that can also be considered in the future since 3d lighting also has forward and deferred rendering in bevy.
Light layers do seem tricky with deferred rendering though.