Masking with 9 Patch

Godot Version

4.5

Question

I'd like to have a 9 patch that clips a color rect, so the entire screen is black except for inside of the border. I’ve set up the nine patch so the interior is transparent and the bits of the edges that don’t have anything are black but I can’t figure out how to get the background to work.

I’m not sure what effect you are trying to achieve? It looks like you already have the background black except for inside the border.

I want the whole screen to be black except for inside the nine patch. Right now I have this.

This is what I want.

It might be easier to just have four different black ColorRects for the four sides. I don’t think masks work like that in Godot.

1 Like