2d Lights that interact with the terrain

Godot Version

4.2.2

Question

Absolute newbie here. Is there an out of the box way to have lights that collide with the terrain in godot 2d.
there’s a blog post on this about celeste here:
https://medium.com/@NoelFB/remaking-celestes-lighting-3478d6f10bf

There’s roughly three parts to doing this:

  • Set up CanvasModulate to be dark
  • Create a light source and set it to create shadows
  • Set the items to have shadows

How far have you got in the process?

My solution for this is to leave the edge pixels out of the occlude2d so that they receive light but not the rest of the sprite. however this manual work.