Hi everyone.
I'm trying to make a shader that take the position of a light source (or any object or point in the world space) and start a gradient from it using nodes. Then, the "illuminated" area should be shown in the object as a gradient that the size depends of the proximity of the light source.
It's kinda hard to explain with words, so I did sketch to show what I'm trying to achieve:
![Image: https://us.v-cdn.net/5021068/uploads/editor/31/xb6yexnnqdyu.png](https://us.v-cdn.net/5021068/uploads/editor/31/xb6yexnnqdyu.png)
I did some attempts using nodes and drivers.
It's kinda working, but there is a lot of problems when I move the object and when I change his scale... also, the gradient is not in the center, even with the same location of the light source.
![Image: https://us.v-cdn.net/5021068/uploads/editor/kd/0zan092hl83a.jpg](https://us.v-cdn.net/5021068/uploads/editor/kd/0zan092hl83a.jpg)
I don't know what to do from here.
*Note: I use EEVEE
Replies