[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
shaderdl
3Delight shaders are written in RenderMan Shading Language (SL). 3Delight also supports most of the common extensions to this language.
The shader compiler can produce either an object-code shader (a DSO on IRIX and Linux, a DLL on Windows) or a byte-code shader (commonly called interpreted shader). By default, the compiler produces byte-code shaders. If you have a C++ compiler installed on your computer, you can ask shaderdl
to produce object-code shaders by setting the `--dso' command line switch.
The main advantage of byte-code (interpreted) shaders is that they are platform independent: they can be used on IRIX, MacOSX, Linux or Windows computers. This is not the case of object-code shaders. Object-code shaders, however, can be faster than byte-code shaders. We suggest you to produce object-code for those shaders that are computationally intensive, such as volume shaders.
To compile a shader, give the command:
% shaderdl shader.sl |
shaderdl
. The output file name is the name of the shader (the identifier following the keyword surface
, displacement
, light
, or volume
in the
SL program) followed by the suffix `.sdl'.
Some renderers' shader compiler append the name of the platform at the end of object-code shader's name. 3Delight shader compiler does not use this convention. An object-code shader will always have the same name, regardless of the platform for which it is compiled. We recommend that you keep shaders compiled for different platforms in separate directories (this of course is not necessary for interpreted shaders).
The shaderdl
program is a script that call a suite of compilation tools. We explain the compilation process in the next sub-section. Then, we list the command line options accepted by shaderdl
and explain how you can use them to modify the behaviour of shaderdl
. Finally, we explain how you can customize shaderdl
to fit some particuliar needs.
3.2.1 Compilation Process 3.2.2 Command Line Options 3.2.3 Customizing the Compilation Script
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |