- Home /
Visual bug with freeform Light2D overlapping itself
I'm using the new experimental light 2D component (so I understand if there's currently no solution) and I'm getting an issue where the freeform light is overlapping itself, creating noticeable artifacts:
As you can see in the second image, the bounds of the light is intersecting itself. I've tried using AlphaBlendOnOverlap but that just reduces the effect slightly rather than fixing it.
The effect I want is: I can only get this if I don't use tight corners convex corners, which unfortunately I intend to use a lot of.
Answer by myazuid · Apr 12 at 01:32 PM
did you ever happen to find a solution to this?
I never found a real solution, but I was able to get a reasonable result by creating really long, thin shapes with the light's polygon:
This tricks Unity into moving the affected areas so they don't overlap each other, although the thin area of the polygon can't overlap any other lit sprite or it'll appear very clearly.
If you have a play around, you should be able to get reasonable results, although depending on the angles you work with there are sometimes noticeable artifacts:
Your answer
Follow this Question
Related Questions
Why do 2D Lights render past shadowcasters. 1 Answer
2D: Can I use URP Post Processing Volume on a specific object? 0 Answers
How can I set up different rendering layers for differing Unity UI components 0 Answers
Why are there lines between my pixel art tiles? 1 Answer
how to make SpriteRenderer visible only in bounds (2D) 1 Answer