Add Sprite Mask to Light

Hello,

I was wondering if it is possible to use sprite masks to cover up lighting. Currently I am using a sprite mask attached a to a mesh that is created using ray-casts to create an FOV effect, but lighting is very important to the feel of my game. I was wondering if I could use that same sprite mask to render only certain parts of my light when they are in the mask.

Thank you

Hey @rowantichelaar , thanks for the question!

So we recently implemented additional Sprite Mask support in 23.1. So Sprite Masks now works with:

  • Tilemap Renderer

  • Sprite Shape Renderer

  • Sprite Renderer (Improved support with)

  • 9-Sliced

  • Animated

My understanding is that you hope to reuse the same Sprite Mask to mask out certain parts of your light. I’m not aware that’s possible but I do know there’s an alternative method, which is to use a Sprite Light. It has a Sprite field which allows you to specify a Sprite as a mask.

8738739--1183449--Sprite Light.png

This may be a silly answer altogether but hopefully this gives you a free bump while someone wiser comes along!