[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.6 Using shaderinfo to Interrogate Shaders

shaderinfo is a utility to interrogate compiled shader. This can prove usefull when you do not have the shader's source code and you want to know what are its parameters.

To get information about a shader, use shaderinfo like this:

 
% shaderinfo matte

shaderinfo generate the following output:
 
surface "matte"
    "Ka" "uniform float"
                Default value: 1
    "Kd" "uniform float"
                Default value: 1

To find a shader, shaderinfo will use the search paths specified by the DL_SHADERS_PATH (or DL_RESOURCE_PATH) environment variable.

shaderinfo has a special switch that helps declaring parameter types in a RIB file:
 
% shaderinfo -d matte

will generate the following output:
 
surface "matte"
Declare "Ka" "uniform float"
Declare "Kd" "uniform float"

Declarations can be pasted directly into the RIB.



This document was generated by Aghiles Kheffache on July, 31 2003 using texi2html
3Delight 1.0.0. Copyright 2000-2003 The 3Delight Team. All Rights Reserved.