[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Some shader examples can be found in the `shaders/src' directory. If you need a tutorial on how to write shaders you should read the following classics:
Since each renderer has its own implementation of the shading language, shaders writers may want to isolate compiler specific code. shaderdl
predefines the preprocessor symbol DELIGHT
in order to make this possbile.
#if defined(DELIGHT) print("Compiled with 3Delight\n"); #elif defined(RDC) print("Compiled with RenderDotC\n"); #elif defined(BMRT) print("Compiled with Blue Moon Rendering Tools\n"); #else print("yet another rman renderer\n"); #endif |
Do not forget that before using a shader in 3Delight, one must compile it using 3Delight shader compiler, shaderdl
.
See section 3.2 Using the Shader Compiler - shaderdl
for details on this.