- Home /
Unity 2D Shader Graph Sprite transparent when in shadow
I am using shader graph with a 2d lit shader, and I'm trying to find a way to check the light level at a place in the scene to know if the sprite has a shadow cast on it (from the 2d shadow caster component). With that I can remap it and use it as the alpha channel for the shader.
Is there a way I can check if the object is in the light or not? I'm thinking I might need to run a custom script.
The result I'm going for is a point light that shows a players vision, and sprites outside of that light become invisible if they have this material.
Your answer
Follow this Question
Related Questions
Custom Sprites/Diffuse shader w/ shadows not lighting properly 1 Answer
Sprite in 3D environment with lights problem 1 Answer
How can I fix URP 2D shadow for sprites?,Issues with 2D shadow casting in URP 0 Answers
Radial blur effect shader for textures to work with sprites? 1 Answer
Sprite texture incorrect 0 Answers