0
\$\begingroup\$

I'm trying to replicate the example given in this thread: https://gamedev.stackexchange.com/a/185593/179264, and I was able to, but for now I want to implement the "mask" thing to 2d lights and not only sprite renderer in Unity.

What would be the best way or tutorial to achieve this?

\$\endgroup\$
4
  • \$\begingroup\$ You would probably have to do this with some kind of shader, I dont think you can do something like this with just lights \$\endgroup\$ Commented May 23, 2024 at 13:24
  • \$\begingroup\$ I did with shaders, but it's only working with sprite renderers. I want to find a way to use it with the alpha channel of lights or some like that. \$\endgroup\$ Commented May 23, 2024 at 13:40
  • \$\begingroup\$ Can you explain what it would mean to implement this mask to 2D lights? Can you mock up an image of what you want it to look like, contrasted against what you have working so far? \$\endgroup\$ Commented May 23, 2024 at 15:08
  • \$\begingroup\$ For sure! !IMG Here, the red lined is a sprite using the material with the tutorial shader, the sprite is a circular gradient, but with the shader is just solid border. The pink lined is the same sprite but using default sprite shader, it keeps the gradient, and mask a little, but paint the color too, so not useful. The green one is a 2D light. I want to use this to achieve effects like candles, fireplaces, cast shadows, etc. \$\endgroup\$ Commented May 26, 2024 at 2:12

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.