   Raytracing shaders
  I'm writing a raytracer that has an abstract shader class.Firstly, what data is 'expected' from a shader point of view?Material, incoming ray, what else?Also, how could I implement 'custom' shaders? I thought of using python or lua, but wondered if It would be more efficient to have a custom bytecode shader compiler for the raytracer?what are your thoughts?   
  There was an excellent paper at the RT07 conference on this very subject:http://www.cs.utah.edu/~boulos/research.htmIt's called 'RTSL' and basically this is a compiler that takes GLSL-like code and turns it into SIMD optimized shader code. It will also emit regular scalar code if your ray tracer is not a packet tracer.   ;  thanks... this is useful :DI still don't know if I will make a custom shader language tailored to my ray tracer or RTSL, but this is useful. I never thought of camera shaders :P   ;  I am not sure if that geometry / light / camera stuff in that paper is terribly useful, but the material stuff definitely is. Writing a decent shader, especially if you need both a SIMD and scalar function (with identical output) can be tricky and time-consuming. So it's definitely a good start, but probably only if your internal data matches the input and output of the generated code. It looks generic enough though.   