So as u understand the main problem is that there is no L(light source direction) vector in OSL Global Variables.
But how can we apply different shading models from scratch in OSL. Help me to BRAKE my old PARADIGM in shader writing.
I see that my question is too “blurry”, but I hope some one who familiar with shader writing will understand me.
By the way, AFAIR in Cycles you get the ON shader by setting a non-zero roughness on the standard diffuse material. Not sure that’s accessible via OSL, but it’s already there, so you don’t need to re-implement it.