- Home /
How to get Light data of sprite to make Among us style lighting.,How Can I get the Light data for sprites to check if a sprite is in darkness to make Among us style lighting.
Hello everyone I was looking everywhere on the internet to see if there was anyway to get light data for textures. The reason I am trying to get this data is to check if the sprite is not in light or shadow then the pixels of that sprite will be render. If its in shadow then I will set that pixels alpha to 0 so it doesnt show. I am trying to make a lighting system like Among us style.
So just to give a little more information I know I could use ray casting to create the desired effect that I want but I wanted to find a more optimal way of doing this effect. Unity already has light that cast shadows in 2D but I’m trying to understand how to get that data of the light fall off/shadow on other objects.
Have you found any solutions to this problem? I'm also trying to figure out how to change the alpha based on lighting
Answer by tidyui · Oct 18, 2020 at 12:08 PM
If you’re just interested in creating the visual effect I wrote an article on this back in 2018.
https://medium.com/@tidyui/fast-beautiful-2d-lighting-in-unity-47b76b10447c
Your answer
Follow this Question
Related Questions
Lightmapping - Exclude object 1 Answer
Progressive GPU switches to Progressive CPU 2019.2 2 Answers
Baked Lightmap: Parts of scenes appear too dark 0 Answers
Lightmapping - Lightmap Resolution 1 Answer
Lightmaps Problems On Blender Models 0 Answers