Material, get face angle relative to a position

I have a sphere, in the material I need to see if a face normal is facing the center of the sphere or at an angle, returning black/white.
Heres a picture to help explain, the two faces circled in red are at the same world angle, but different angles relative to the sphere pivot
Mat

Update
I found this math which seems to work, the results aren’t perfect but it works well enough for me.
float dot = Vector3.Dot(transform.forward, (other.position - transform.position).normalized);
Here’s a picture of my graph

1 Like