Need some help with simle shader

Hello everyone. I’m zero in shader writing, but I need one for some tests. It must work like this : If the surface normal is facing the light source, it’s lit (Color1). If it’s facing more than 90 degrees away from the light source, it’s not (Color2). Can someone help me?

Sounds like you’re looking for a dot product.

Have a look at these examples.