So I am working on a project to develop a physically realistic lunar surface shader (see Hapke Model), but it seems that I cannot do it directly with OSL as I need information on the angle of incidence, angle of emission, and the phase angle for light. From my reading (I am new to OSL), it appears OSL does not provide access to these so that the renderer can be better optimized.
What do you think the path of least resistance here is? Should I just work on it in GLSL instead? If I do develop a custom closure, is it something that the Blender/cycles community would want to make use of or is the idea here to stick with a small set of well understood/commonly used closures?
Parts of the Hapke model relates to other well-known models such as the Lambertian, Oren-Nayar, and especially Lommel-Seeliger, so perhaps it’s possible to make use of an existing BSDF and then tack on my equations in a OSL script, but I’m not sure I have the level of understanding needed to do that yet.