What is the easiest way to highlight part of the screen. like in candy crash tutorial?

here is a reference and i need to do the same

do i need to make compound full screen shape from several rects and one rect with texture which has a hole. Use custom shader. or maybe there is another easy way to achieve this. Or maybe i can use some “blend mode” trick.


On top of my head I would probably do this.
Make the shape as a sprite and use that as a 9 sprite. Place this sprite in the same predicate as your scene (in this case the candy), have this sprite drawn behind the candy but in front of everything else. The gui and the candy are now not “dimmed”, now send a “tint” message to the candies and gui elements that you want “dimmed”.


I wonder if it wouldn’t be possible to use stencil buffers here as well.
Here is an example of this
I’m not an expert on stencil buffers, so I cannot give you a very good example on how to do this myself :slight_smile: