How to make a specific area of a sprite transparent?

Godot Version



I am creating a wall with windows that will block the player, and the player will only be visible when passing through the windows. I intend to use a large sprite and “cut holes” in it to achieve this effect. Since this feature will be reused in many places, managing it on a large image with “holes” is more efficient than piecing together multiple images based on shapes.

Is this functionality achievable?

You can do this using gdshader, search “cut” in Godot Shaders website