OpenGL Volumizer 2.9 Reference Pages


NAME
vzTMGradientShader - Built-in gradient shader to be used with the vzTMRenderAction.

INHERITS FROM
vzShader

HEADER FILE
#include <Volumizer2/TMGradientShader.h>

PUBLIC METHOD SUMMARY
vzTMGradientShader (  );

PROTECTED METHOD SUMMARY
virtual ~vzTMGradientShader (  );

CLASS DESCRIPTION
The vzTMGradientShader is a built-in shader to be used with the vzTMRenderAction. This cross-platform shader implements a gradient shading algorithm using platform dependent algorithms. Depending on the underlying OpenGL implementation, the application might be required to provide the per-voxel gradient values for the 'volume' texture being rendered as a parameter to the shader (see section PARAMETERS). In this case, the parameter 'volume' defines the actual volume data, while the parameter 'gradient' defines the gradient values for the data. The RGB values of 'gradient' provide the (a, b, c) coefficients for the gradient at the corresponding voxel in 'volume'.

The application can control the light direction using the parameter 'lightdir' and the transfer function using the parameter 'lookup_table'. The shader allows controlling the ambient, diffuse and specular coefficients using optional parameters. If not specified, the diffuse coefficient is assumed to be (1.0, 1.0, 1.0) and the ambient to be (0.0, 0.0, 0.0).

PARAMETERS
The shader expects six parameters. Two of these parameters, namely ambient and diffuse, are optional parameters:


Note:

METHOD DESCRIPTIONS

   vzTMGradientShader()
vzTMGradientShader (  );

Constructor.

   ~vzTMGradientShader()
virtual ~vzTMGradientShader (  );

Destructor.

SEE ALSO
vzParameterLookupTable, vzParameterVec3f, vzParameterVolumeTexture, vzShader, vzTMRenderAction

Back to Index