Prebake 2D lighting?

Godot Version

4.7

Question

It seems like DirectionLight2D doesn’t have a bake mode parameter like its 3D counterpart does in this video. The first time lighting is enabled in my game, there’s a lag spike. Any good way to fix that?

That’s not in the engine just yet.

You’ll need to use an external plugin.

It may be added in future.

:smiley:

Could include a bit more details about game.

Have you used debugger / profiler?

Without directional2d is it running smoothly?

Some pictures, code could also help with guessing.

Runs smoothly without lighting. Decided to cut it for now. It’s a “menu game”, and lighting isn’t necessary to make it look good.