This section only describes the representation of phenomena in the .mi language. The declaration of a phenomenon is very similar to the declaration of a shader, except that the keyword shader is replaced with phenomenon, and the addition of new optional statements in the declaration block:

declare phenomenon
    [type] "phenomenon_name" (  
        type "parameter_name",  
        type "parameter_name",  
        type "parameter_name"  
    [version versionint]
    [shader "name" ...]
    [material "name" ... end material]
    [light "name" ... end light]
    [instance "name" ... end instance]
    [roots ]  
    [options ]  
end declare  

For a description of version, shader, material, light, and instance definitions, see the corresponding section above; the syntax is identical to the one described there. The order of shaders, materials, lights, and instances is arbitrary, as long as a name is not used before it was defined. The options are identical to the options described in the shader declaration section above. The roots are described below.

The phenomenon phenomenon_name declared with this statement is available for the definition of shaders just like a shader declared with a declare shader statement. Named and anonymous shader definitions can be derived from either type of declaration. Phenomena were designed to extend the concept of shaders, not to replace it.

Copyright © 1986-2011 by mental images GmbH