Normal (N) and Vector (I) for shaders through Maxscript - this is possible?


#1

Hi,
The Chaosgroup website has a description and OSL code for the complex_ior.osl shader for compute physically correct IORs for metal surfaces: https://docs.chaosgroup.com/display/OSLShaders/Complex+Fresnel+shader
This code uses the formula to obtain the cosine of the incident angle: thetaCos = abs (dot (-I, N)) ,which takes into account the global variables I (vector) and N (normal).
In OSL, these values are constant and there are no questions.
Is there any method or function for getting I and N values for a shader via maxscript or .NET?
Thank you in advance for any help in this matter!

Regards, Philip.