   Shading Function?
  Next semester I get to do a programming project for a CS course. I'm thinking of implementing my new rendering algorithm in a new global lllumination renderer. I will also take the opportunity to implement an ASM-like shader language into the renderer, which will be based on raytracing (and possibly make a C-like language compiler for it, if I have the time).What I'm wondering about is how shading functions typically operate in raytracers, and how shader languages are typically designed for them. Do the shading languages provide only a shading function, or do they specify how the material is supposed to refract/reflect/diffuse light. I am also interested in knowing what are the usual parameters to such procedures, and if raytracer shading languages typically allow to specify how secondary rays are to be traced.   
  You might want to take a look at the RenderMan interface:https://renderman.pixar.com/products/rispec/index.htm