Friday, August 24, 2007

Ray Tracing Shading Language

Steve Parker and friends at Utah have developed a ray tracing shading language (RTSL) described in this pdf file. I am very excited about this work for entirely selfish reasons. I like ray tracing partially because of the elegant code. Now add ray packets and SSE and voila-- it makes DirectX code look lovely in comparison. The initial results are that ray packets and SSE can be relegated to a compiler with little or no loss of performance. and the code is pretty sweet looking. I have been looking over the shoulder of this project writing some RTSL code and it really seems to work as well as reported in the paper. A surprise to me is that it is much nicer to write than C++ for me because you avoid the blasted C++ header files.

2 comments:

Sebastian Mach said...

After discovering gnu-bison some time ago (thanks to Thomas Ludwig, whom is known herearound I think ;) ), I have also thought about writing a Ray Tracing Programming Language, but on an even higher level of abstraction (at an abstraction level similar to SQL), in which you query the system for intersections, which does automatic shading, and so on. But then I thought that on such an high level, the RTPL would have been lead ad absurdum, because all the Ray Tracers in the world do already abstract the thing in such a manner.

After that I thought about writing a C++-Meta-Language, which produces, out of an easy to read RTPL, a [customizable] C++-dump (with optionally a kind of -SSE switch, so it is more sys-independent), and if I glimpsed on the paper correctly, the authors have done a great job in that respect now, so Congrats to them!

syoyo said...

Peter & Sebastian,

I think designing various DSL(Domain-Specific Language) for Ray Tracing will become a hot research topic in the graphics for the next couple of years.

Designing RT language from SQL-like approach seems interesting, but I also has an another thought that it would be funny if a completely new Ray Tracing Language is built from Functional Language approach.

- A Domain-Specific Language for the Generation of Optimized SIMD-Parallel Assembly Code
http://www.cas.mcmaster.ca/~kahl/Publications/TR/Anand-Kahl-2007a_DSL/

- Data Parallel Haskell
http://research.microsoft.com/~simonpj/papers/ndp/index.htm