/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   Copyright 1989-2018 by AutoDesSys, Inc.                                                 *
 *                                                                                           *
 *   This software and its associated documentation contains proprietary,                    *
 *   confidential, and trade secret information of AutoDesSys Inc. and may not be            *
 *   disclosed, copied in any form, or used for any purpose except as specifically           *
 *   permitted in writing by AutoDesSys, Inc.                                                *
 *                                                                                           *
 *   AutoDesSys, Inc. grants permission to use the software to those who purchase            *
 *   a license.  Such a usage will be made according to the terms and conditions             *
 *   specified in the license agreement to which a licensee agrees before installing         *
 *   and commencing usage of the software.  The license agreement can be found               *
 *   on the envelop that contains the software CD.                                           *
 *                                                                                           *
 *   AutoDesSys, Inc. also grants permission to licensees to develop extensions to           *
 *   the software, which can be in the form of scripts or plugins.  The permission           *
 *   includes calling the API and call back functions provided by AutoDesSys, Inc.           *
 *   and accessing information relevant to these functions and the general workings          *
 *   of form.Z, but only up to the point to which AutoDesSys, Inc. has chosen to             *
 *   expose, through its form.Z SDK Manual.  All extensions developed by third               *
 *   parties will include a copy of this copyright note in an easily accessible place or     *
 *   a clear instruction to read this original note by AutoDesSys, Inc.                      *
 *                                                                                           *
 *   All the software distributed under a license, either for the purpose of using it or     *
 *   for the purpose of developing extensions, is distributed AS IS, WITHOUT                 *
 *   WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND                                    *
 *   AutoDesSys, Inc. HEREBY DISCLAIMS ALL SUCH WARRANTIES,                                  *
 *   INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF                                         *
 *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.                                    *
 *                                                                                           *
 *   formZ, RenderZone, and RadioZity are registered trademarks of AutoDesSys, Inc.          *
 *                                                                                           *
 *   form.Z SDK, Version 8.6.3, Dec 03, 2018                                                 *
 *                                                                                           *
 *                                                                                           *
 *********************************************************************************************/



#ifndef __FORMZ_RZNE_SHDR_API_H
#define __FORMZ_RZNE_SHDR_API_H

#ifdef __cplusplus
extern "C" {
#endif

#include "fzpl_plugin.h"

#include "fz_api.h"
#include "fz_type_api.h"
#include "fz_fuim_api.h"
#include "fz_rmtl_api.h"





/****************************************************************

	fz_shdr_cbak_colr_uuid



	Description
		Color shader uuid function (Required). This function is called 
		once at startup. It is expected to supply the uuid of 
		a color shader.

	Parameters
		uuid  [Result]
			The uuid of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_colr_uuid_func)(
	fzrt_UUID_td	uuid
	);

/****************************************************************

	fz_shdr_cbak_colr_name



	Description
		Color shader name function (Required). This function is called 
		once at startup. It is expected to supply the name of 
		a color shader, as it will appear in the Color menu in the 
		Surface Style Parameters dialog.

	Parameters
		name  [Result]
			The name of the shader.
		max_len  [Input]
			The maximum number of characters the shader name can have.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_colr_name_func)(
	char	*name,
	fzrt_int 	max_len
	);


/****************************************************************

	fz_shdr_cbak_colr_version



	Description
		Color shader version function (Optional). This function is called 
		once at startup. It is expected to supply the version of 
		a color shader.

	Parameters
		version  [Result]
			The version of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_colr_version_func) (
	fzpl_vers_td *version
	);

/****************************************************************

	fz_shdr_cbak_colr_set_parameters



	Description
		Color shader parameter function (Optional). This function is called 
		once at startup. It is expected to define the parameters 
		which are used by a color shader. There are particular functions 
		available which create a certain shader parameter, such 
		as a color, a scale factor or a boolean parameter. These 
		functions are called shdr_set_..._param and can be found 
		in the fz_shdr_fset function set.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_colr_set_parameters_func)(
	void
	);

/****************************************************************

	fz_shdr_cbak_colr_pre_render



	Description
		Color shader pre_render function (Optional). This function is called 
		once before the start of each rendering. It is expected to 
		precompute information that will be used by the fz_shdr_cbak_colr_pixel 
		function. Typically, the pre-render function will allocate 
		a data structure, fill it with precomputed information 
		and pass the pointer of the structure back to formZ via 
		the function argument. This pointer will be passed back into 
		the fz_shdr_cbak_colr_pixel function and also the fz_shdr_cbak_colr_post_render function, 
		which should de-allocate the structure.

	Parameters
		shdr_data  [Result]
			The pointer, which is passed to the fz_shdr_cbak_colr_pixel and fz_shdr_cbak_colr_post_render callback functions 
			of a shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_colr_post_render, fz_shdr_cbak_colr_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_colr_pre_render_func)(
	void** shdr_data
	);
	
/****************************************************************

	fz_shdr_cbak_colr_post_render



	Description
		Color shader post_render function (Optional). This function is called 
		once after the end of each rendering. It is expected to 
		clean up anything that was allocated with the pre_render 
		function. In particular, if the pre_render function allocated 
		a structure and passed the pointer to the structure back to 
		formZ, the post_render function should de-allocate the 
		structure. The pointer passed back to formZ by the pre_render 
		function is passed into the post_render function.

	Parameters
		shdr_data  [Result]
			The pointer, which was created by the pre_render callback function.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_colr_pre_render, fz_shdr_cbak_colr_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_colr_post_render_func)(
	void* shdr_data
	);



/****************************************************************

	fz_shdr_cbak_colr_pixel



	Description
		Color shader main function (Required). It is 
		expected to compute the unshaded color of a pixel. 
		It is called by formZ at least once for each pixel.

	Parameters
		shdr_data  [Input]
			Shader data. This is the pointer which was returned to formZ by the 
			fz_shdr_cbak_colr_pre_render API callback function. 
			It allows the plugin to pass data from the initialization stage 
			to this function. Typically, this is information, 
			which is precomputed once at rendering start.

	Returns
		The color of the pixel.


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_colr_pre_render, fz_shdr_cbak_colr_post_render

 ****************************************************************/
typedef fz_rgb_float_td	 (*fz_shdr_cbak_colr_pixel_func)(
	void *shdr_data
	);


/****************************************************************

	fz_shdr_cbak_colr_avg



	Description
		Color shader average color function (Optional). This function is called by 
		formZ at certain intervals, to determine an average color 
		for this color shader.

		A typical implementation of this function would take all the 
		individual colors used in the shader and calculate the 
		mathematical average; for example : (col1 + col2 + col3) / 3.0.

		if this function is not supplied, the average color for 
		a shader is always set to 50% gray (rgb = 0.5,0.5,0.5).

	Returns
		The average color of the color shader.


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fz_rgb_float_td	 (*fz_shdr_cbak_colr_avg_func)(
	void
	);

/****************************************************************

	fz_shdr_cbak_colr_iface_tmpl



	Description
		Color shader dialog function (optional). This function is called 
		when the shader dialog is invoked. It is expected to create 
		the editing items to display the content of the shader parameters.

		The dialog template will be created by formZ. Unlike other 
		interface callback functions, it is not necessary to call 
		fz_fuim_tmpl_init to create the dialog template.

		A number of utility functions are available to assist in 
		laying out the dialog for a shader. In specific they are :

		fz_shdr_get_parm_ptr :	retrieves the pointer to a shader 
		parameter. This pointer can be used 
		as input to the set range functions 
		of a fuim item. 
		fz_shdr_fuim_create_scale_items   : Creates the standard scale items 
		fz_shdr_fuim_create_noise_items   : Creates the standard noise items 
		fz_shdr_fuim_create_asample_items : Creates the standard area sample items

	Parameters
		windex  [Input]
			project window index
		fuim_tmpl  [Input]
			Pointer to the dialog template.
		shdr_ptr  [Input]
			Pointer to the color shader.
		parent_group  [Input]
			The item group under which to construct the dialog items. 
			This group id should be used as the parent id for all 
			next level items created in the dialog template.

	Returns
		error code.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_colr_iface_tmpl_func)(
	fzrt_int				windex,
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group
	);

/****************************************************************

	fz_shdr_cbak_colr_pdf_help



	Description
		Instructs a formZ extension to register its help data.

	Availability	6.0.0.0

 ****************************************************************/
typedef fzrt_error_td  (*fz_shdr_cbak_colr_pdf_help_func)(void);

/****************************************************************

	fz_shdr_cbak_colr_fset


	FZ_SHDR_CBAK_COLR_FSET_TYPE
		formZ color shader callbacks function set id.

	FZ_SHDR_CBAK_COLR_FSET_NAME
		formZ color shader callbacks function set name.

	FZ_SHDR_CBAK_COLR_FSET_VERSION
		formZ color shader callbacks function set version.

	Description
		Function set for color shaders. The functions in this set need to 
		be supplied by the plugin or script to implement a color shader.

		The main shader function is the fz_shdr_cbak_colr_pixel callback. It is expected 
		to compute the original (unshaded) color of a pixel. Depending on whether 
		the shader is a 2d or 3d shader, the 2d texture space coordinate (s,t) or 
		the 3d texture space coordinate (x,y,z) relating to the pixel should be 
		taken as the basis of the color computation. These coordinate values 
		can be retrieved with the functions fz_shdr_get_tspace_st (2d) or 
		fz_shdr_get_tspace_pnt (3d).

		There are required and optional functions. The required functions 
		are : 
		fz_shdr_cbak_colr_name 
		fz_shdr_cbak_colr_pixel 
		All other functions are optional, but must be supplied to 
		enable a certain functionality. For example, if the color 
		shader has any parameters, the fz_shdr_cbak_colr_set_parameters function 
		must be supplied. It is also advisable to implement a fz_shdr_cbak_colr_pre_render 
		function, if the fz_shdr_cbak_colr_pixel function uses information which can be calculated 
		once and does not change during the course of a rendering. 
		It is important to note, that the fz_shdr_cbak_colr_pixel function is called 
		at least once for each pixel, potentially thousands of times 
		during a single rendering. The faster the fz_shdr_cbak_colr_pixel function, the faster 
		the rendering will be.

	Availability	5.0.0.0

 ****************************************************************/

#define FZ_SHDR_CBAK_COLR_FSET_TYPE			"\x35\xb7\xed\x90\x20\x38\x41\x68\x8a\xf0\xd0\xe1\x54\x20\x49\xb8"
#define FZ_SHDR_CBAK_COLR_FSET_NAME			"formZ RenderZone Color Shader Callbacks"
#define FZ_SHDR_CBAK_COLR_FSET_VERSION		FZPL_VERS_MAKE(6,0,0,0)

typedef struct fz_shdr_cbak_colr_fset
{
	fzpl_fset_prvt_data_td					prvt_data;

	fz_shdr_cbak_colr_uuid_func					fz_shdr_cbak_colr_uuid;
	fz_shdr_cbak_colr_name_func					fz_shdr_cbak_colr_name;
	fz_shdr_cbak_colr_version_func				fz_shdr_cbak_colr_version;
	fz_shdr_cbak_colr_set_parameters_func		fz_shdr_cbak_colr_set_parameters;
	fz_shdr_cbak_colr_pre_render_func			fz_shdr_cbak_colr_pre_render;
	fz_shdr_cbak_colr_post_render_func			fz_shdr_cbak_colr_post_render;
	fz_shdr_cbak_colr_pixel_func				fz_shdr_cbak_colr_pixel;
	fz_shdr_cbak_colr_avg_func					fz_shdr_cbak_colr_avg;
	
	
	
	fz_shdr_cbak_colr_iface_tmpl_func			fz_shdr_cbak_colr_iface_tmpl;
	fz_shdr_cbak_colr_pdf_help_func				fz_shdr_cbak_colr_pdf_help;
	
}  fz_shdr_cbak_colr_fset;



/****************************************************************

	fz_shdr_cbak_refl_uuid



	Description
		Reflection shader uuid function (Required). This function is called 
		once at startup. It is expected to supply the uuid of 
		a reflection shader.

	Parameters
		uuid  [Result]
			The uuid of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_refl_uuid_func)(
	fzrt_UUID_td	uuid
	);

/****************************************************************

	fz_shdr_cbak_refl_name



	Description
		Reflection shader name function (Required). This function is called 
		once at startup. It is expected to supply the name of 
		a reflection shader, as it will appear in the Reflection menu in the 
		Surface Style Parameters dialog.

	Parameters
		name  [Result]
			The name of the shader.
		max_len  [Input]
			The maximum number of characters the shader name can have.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_refl_name_func)(
	char	*name,
	fzrt_int 	max_len
	);


/****************************************************************

	fz_shdr_cbak_refl_version



	Description
		Reflection shader version function (Optional). This function is called 
		once at startup. It is expected to supply the version of 
		a reflection shader.

	Parameters
		version  [Result]
			The version of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_refl_version_func) (
	fzpl_vers_td *version
	);

/****************************************************************

	fz_shdr_cbak_refl_set_parameters



	Description
		Reflection shader parameter function (Optional). This function is called 
		once at startup. It is expected to define the parameters 
		which are used by a reflection shader. There are particular functions 
		available which create a certain shader parameter, such 
		as a reflection, a scale factor or a boolean parameter. These 
		functions are called shdr_set_..._param and can be found 
		in the fz_shdr_fset function set.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_refl_set_parameters_func)(
	void
	);

/****************************************************************

	fz_shdr_cbak_refl_pre_render



	Description
		Reflection shader pre_render function (Optional). This function is called 
		once before the start of each rendering. It is expected to 
		precompute information that will be used by the fz_shdr_cbak_refl_pixel 
		function. Typically, the pre-render function will allocate 
		a data structure, fill it with precomputed information 
		and pass the pointer of the structure back to formZ via 
		the function argument. This pointer will be passed back into 
		the fz_shdr_cbak_refl_pixel function and also the fz_shdr_cbak_refl_post_render function, 
		which should de-allocate the structure.

	Parameters
		shdr_data  [Result]
			The pointer, which is passed to the fz_shdr_cbak_refl_pixel and fz_shdr_cbak_refl_post_render callback functions 
			of a shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_refl_post_render, fz_shdr_cbak_refl_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_refl_pre_render_func)(
	void** shdr_data
	);
	
/****************************************************************

	fz_shdr_cbak_refl_post_render



	Description
		Reflection shader post_render function (Optional). This function is called 
		once after the end of each rendering. It is expected to 
		clean up anything that was allocated with the pre_render 
		function. In particular, if the pre_render function allocated 
		a structure and passed the pointer to the structure back to 
		formZ, the post_render function should de-allocate the 
		structure. The pointer passed back to formZ by the pre_render 
		function is passed into the post_render function.

	Parameters
		shdr_data  [Result]
			The pointer, which was created by the pre_render callback function.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_refl_pre_render, fz_shdr_cbak_refl_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_refl_post_render_func)(
	void* shdr_data
	);



/****************************************************************

	fz_shdr_cbak_refl_pixel



	Description
		Reflection shader main function (Required). It is 
		expected to retrieve the unshaded color of a pixel 
		and add shading to the pixel color. 
		It is called by formZ at least once for each pixel.

	Parameters
		shdr_data  [Input]
			Shader data. This is the pointer which was returned to formZ by the 
			fz_shdr_cbak_refl_pre_render API callback function. 
			It allows the plugin to pass data from the initialization stage 
			to this function. Typically, this is information, 
			which is precomputed once at rendering start.

	Returns
		The color of the pixel.


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_refl_pre_render, fz_shdr_cbak_refl_post_render

 ****************************************************************/
typedef fz_rgb_float_td	 (*fz_shdr_cbak_refl_pixel_func)(
	void *shdr_data
	);



/****************************************************************

	fz_shdr_cbak_refl_iface_tmpl



	Description
		Reflection shader dialog function (optional). This function is called 
		when the shader dialog is invoked. It is expected to create 
		the editing items to display the content of the shader parameters.

		The dialog template will be created by formZ. Unlike other 
		interface callback functions, it is not necessary to call 
		fz_fuim_tmpl_init to create the dialog template.

		A number of utility functions are available to assist in 
		laying out the dialog for a shader. In specific they are :

		fz_shdr_get_parm_ptr :	retrieves the pointer to a shader 
		parameter. This pointer can be used 
		as input to the set range functions 
		of a fuim item. 
		fz_shdr_fuim_create_noise_items   : Creates the standard noise items 
		fz_shdr_fuim_create_ambient_items : Creates the standard ambient reflection items in a reflection shader. 
		Similar functions are available for diffuse, specular, mirror, 
		transmission and glow.

	Parameters
		windex  [Input]
			project window index
		fuim_tmpl  [Input]
			Pointer to the dialog template.
		shdr_ptr  [Input]
			Pointer to the reflection shader.
		parent_group  [Input]
			The item group under which to construct the dialog items. 
			This group id shoud be used as the parent id for all 
			next level items created in the dialog template.

	Returns
		error code.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_refl_iface_tmpl_func)(
	fzrt_int				windex,
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group
	);

/****************************************************************

	fz_shdr_cbak_refl_pdf_help



	Description
		Instructs a formZ extension to register its help data.

	Availability	6.0.0.0

 ****************************************************************/
typedef fzrt_error_td  (*fz_shdr_cbak_refl_pdf_help_func)(void);

/****************************************************************

	fz_shdr_cbak_refl_fset


	FZ_SHDR_CBAK_REFL_FSET_TYPE
		formZ reflection shader callbacks function set id.

	FZ_SHDR_CBAK_REFL_FSET_NAME
		formZ reflection shader callbacks function set name.

	FZ_SHDR_CBAK_REFL_FSET_VERSION
		formZ reflection shader callbacks function set version.

	Description
		Function set for reflection shaders. The functions in this set need to 
		be supplied by the plugin or script to implement a reflection shader.

		The main shader function is the fz_shdr_cbak_refl_pixel callback. It is expected 
		to compute the shaded color of a pixel. Prior to the call to the 
		reflection pixel function, the color shader's pixel function was 
		called, which computed the unshaded pixel color. This color can 
		be retrieved via the function call fz_shdr_get_col(col). A number 
		of basic shading utility functions are supplied by the 
		fz_shdr_fset function set. For example, fz_shdr_get_diffuse_term 
		can be called to compute the diffuse shading component of a pixel.

		There are required and optional functions. The required functions 
		are : 
		fz_shdr_cbak_refl_name 
		fz_shdr_cbak_refl_pixel 
		All other functions are optional, but must be supplied to 
		enable a certain functionality. For example, if the reflection 
		shader has any parameters, the fz_shdr_cbak_refl_set_parameters function must be supplied. 
		It is also advisable to implement a fz_shdr_cbak_refl_pre_render function, if 
		the fz_shdr_cbak_refl_pixel function uses information which can be calculated 
		once and does not change during the course of a rendering. 
		It is important to note, that the fz_shdr_cbak_refl_pixel function is called 
		at least once for each pixel, potentially thousands of times 
		during a single rendering. The faster the fz_shdr_cbak_refl_pixel function, the faster 
		the rendering will be.

		If the fz_shdr_cbak_refl_set_parameters function is supplied by the plugin or script, it must 
		determine, which of the six basic shading calculations are performed. 
		These are ambient, diffuse, specular, mirror, transmission and glow. 
		This is done by a call to the respective parameter setup function. For 
		example, if fz_shdr_set_diffuse_parm is called, it tells formZ, that the 
		reflection shader will be computing the diffuse shading of a pixel.

	Availability	5.0.0.0

 ****************************************************************/

#define FZ_SHDR_CBAK_REFL_FSET_TYPE			"\x3a\xf3\xf2\x36\x57\x6e\x42\x13\x82\x40\xcd\x05\x5b\xc3\xdc\x1e"
#define FZ_SHDR_CBAK_REFL_FSET_NAME			"formZ RenderZone Reflection Shader Callbacks"
#define FZ_SHDR_CBAK_REFL_FSET_VERSION		FZPL_VERS_MAKE(6,0,0,0)

typedef struct fz_shdr_cbak_refl_fset
{
	fzpl_fset_prvt_data_td			prvt_data;

	fz_shdr_cbak_refl_uuid_func				fz_shdr_cbak_refl_uuid;
	fz_shdr_cbak_refl_name_func				fz_shdr_cbak_refl_name;
	fz_shdr_cbak_refl_version_func				fz_shdr_cbak_refl_version;
	fz_shdr_cbak_refl_set_parameters_func		fz_shdr_cbak_refl_set_parameters;
	fz_shdr_cbak_refl_pre_render_func			fz_shdr_cbak_refl_pre_render;
	fz_shdr_cbak_refl_post_render_func			fz_shdr_cbak_refl_post_render;
	fz_shdr_cbak_refl_pixel_func				fz_shdr_cbak_refl_pixel;
	
	
	
	fz_shdr_cbak_refl_iface_tmpl_func			fz_shdr_cbak_refl_iface_tmpl;
	fz_shdr_cbak_refl_pdf_help_func				fz_shdr_cbak_refl_pdf_help;
	
}  fz_shdr_cbak_refl_fset;




/****************************************************************

	fz_shdr_cbak_trns_uuid



	Description
		Transparency shader uuid function (Required). This function is called 
		once at startup. It is expected to supply the uuid of 
		a transparency shader.

	Parameters
		uuid  [Result]
			The uuid of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_trns_uuid_func)(
	fzrt_UUID_td	uuid
	);

/****************************************************************

	fz_shdr_cbak_trns_name



	Description
		Transparency shader name function (Required). This function is called 
		once at startup. It is expected to supply the name of 
		a transparency shader, as it will appear in the Transparency menu in the 
		Surface Style Parameters dialog.

	Parameters
		name  [Result]
			The name of the shader.
		max_len  [Input]
			The maximum number of characters the shader name can have.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_trns_name_func)(
	char	*name,
	fzrt_int 	max_len
	);


/****************************************************************

	fz_shdr_cbak_trns_version



	Description
		Transparency shader version function (Optional). This function is called 
		once at startup. It is expected to supply the version of 
		a transparency shader.

	Parameters
		version  [Result]
			The version of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_trns_version_func) (
	fzpl_vers_td *version
	);

/****************************************************************

	fz_shdr_cbak_trns_set_parameters



	Description
		Transparency shader parameter function (Optional). This function is called 
		once at startup. It is expected to define the parameters 
		which are used by a transparency shader. There are particular functions 
		available which create a certain shader parameter, such 
		as a transparency factor, a scale factor or a boolean parameter. These 
		functions are called shdr_set_..._param and can be found 
		in the fz_shdr_fset function set.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_trns_set_parameters_func)(
	void
	);

/****************************************************************

	fz_shdr_cbak_trns_pre_render



	Description
		Transparency shader pre_render function (Optional). This function is called 
		once before the start of each rendering. It is expected to 
		precompute information that will be used by the fz_shdr_cbak_trns_pixel 
		function. Typically, the pre-render function will allocate 
		a data structure, fill it with precomputed information 
		and pass the pointer of the structure back to formZ via 
		the function argument. This pointer will be passed back into 
		the fz_shdr_cbak_trns_pixel function and also the post_render function, 
		which should de-allocate the structure.

	Parameters
		shdr_data  [Result]
			The pointer, which is passed to the fz_shdr_cbak_trns_pixel and fz_shdr_cbak_trns_post_render callback functions 
			of a shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_trns_post_render, fz_shdr_cbak_trns_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_trns_pre_render_func)(
	void** shdr_data
	);
	
/****************************************************************

	fz_shdr_cbak_trns_post_render



	Description
		Transparency shader post_render function (Optional). This function is called 
		once after the end of each rendering. It is expected to 
		clean up anything that was allocated with the pre_render 
		function. In particular, if the pre_render function allocated 
		a structure and passed the pointer to the structure back to 
		formZ, the post_render function should de-allocate the 
		structure. The pointer passed back to formZ by the pre_render 
		function is passed into the post_render function.

	Parameters
		shdr_data  [Result]
			The pointer, which was created by the pre_render callback function.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_trns_pre_render, fz_shdr_cbak_trns_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_trns_post_render_func)(
	void* shdr_data
	);



/****************************************************************

	fz_shdr_cbak_trns_pixel



	Description
		Transparency shader main function (Required). It is 
		expected to compute the transparency of a pixel. 
		It is called by formZ at least once for each pixel.

	Parameters
		shdr_data  [Input]
			Shader data. This is the pointer which was returned to formZ by the 
			fz_shdr_cbak_trns_pre_render API callback function. 
			It allows the plugin to pass data from the initialization stage 
			to this function. Typically, this is information, 
			which is precomputed once at rendering start.

	Returns
		The Transparency of the pixel.


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_trns_pre_render, fz_shdr_cbak_trns_post_render

 ****************************************************************/
typedef double	 (*fz_shdr_cbak_trns_pixel_func)(
	void *shdr_data
	);


/****************************************************************

	fz_shdr_cbak_trns_avg



	Description
		Transparency shader average transparency function (Optional). 
		This function is called by formZ at certain intervals, to determine an 
		average transparency for this Transparency shader.

		A typical implementation of this function would take all the 
		individual transparencies used in the shader and calculate the 
		mathematical average; for example : (trn1 + trn2 + trn3) / 3.0.

		if this function is not supplied, the average transparency for 
		a shader is always set to 0% (fully opaque).

	Returns
		The average transparency of the transparency shader.


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef double	 (*fz_shdr_cbak_trns_avg_func)(
	void
	);

/****************************************************************

	fz_shdr_cbak_trns_iface_tmpl



	Description
		Transparency shader dialog function (optional). This function is called 
		when the shader dialog is invoked. It is expected to create 
		the editing items to display the content of the shader parameters.

		The dialog template will be created by formZ. Unlike other 
		interface callback functions, it is not necessary to call 
		fz_fuim_tmpl_init to create the dialog template.

		A number of utility functions are available to assist in 
		laying out the dialog for a shader. In specific they are :

		fz_shdr_get_parm_ptr :	retrieves the pointer to a shader 
		parameter. This pointer can be used 
		as input to the set range functions 
		of a fuim item. 
		fz_shdr_fuim_create_scale_items   : Creates the standard scale items 
		fz_shdr_fuim_create_noise_items   : Creates the standard noise items 
		fz_shdr_fuim_create_asample_items : Creates the standard area sample items

	Parameters
		windex  [Input]
			project window index
		fuim_tmpl  [Input]
			Pointer to the dialog template.
		shdr_ptr  [Input]
			Pointer to the transparency shader.
		parent_group  [Input]
			The item group under which to construct the dialog items. 
			This group id shoud be used as the parent id for all 
			next level items created in the dialog template.

	Returns
		error code.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_trns_iface_tmpl_func)(
	fzrt_int				windex,
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group
	);

/****************************************************************

	fz_shdr_cbak_trns_pdf_help



	Description
		Instructs a formZ extension to register its help data.

	Availability	6.0.0.0

 ****************************************************************/
typedef fzrt_error_td  (*fz_shdr_cbak_trns_pdf_help_func)(void);

/****************************************************************

	fz_shdr_cbak_trns_fset


	FZ_SHDR_CBAK_TRNS_FSET_TYPE
		formZ transparency shader callbacks function set id.

	FZ_SHDR_CBAK_TRNS_FSET_NAME
		formZ transparency shader callbacks function set name.

	FZ_SHDR_CBAK_TRNS_FSET_VERSION
		formZ transparency shader callbacks function set version.

	Description
		Function set for transparency shaders. The functions in this set need to 
		be supplied by the plugin or script to implement a transparency shader.

		The main shader function is the fz_shdr_cbak_trns_pixel callback. It is expected 
		to compute the transparency of a surface pixel. Depending 
		on whether the shader is a 2d or 3d shader, the 2d texture 
		space coordinate (s,t) or the 3d texture space coordinate (x,y,z) 
		relating to the pixel should be taken as the basis of the transparency 
		computation. These coordinate values can be retrieved with the functions 
		fz_shdr_get_tspace_st (2d) or fz_shdr_get_tspace_pnt (3d). The pixel 
		transparency may also be computed from other surface information, 
		such as the surface normal, which is the case in the formZ 
		Neon transparency shader. If the fz_shdr_cbak_trns_pixel function returns 0.0 
		the pixel is considered completely opaque. If the fz_shdr_cbak_trns_pixel function 
		returns 1.0 the pixel is considered completely transparent and 
		therefore invisible. Values less than 0.0 and greater than 
		1.0 are not accepted and will be clamped to 0.0 or 1.0.

		There are required and optional functions. The required functions 
		are : 
		fz_shdr_cbak_trns_name 
		fz_shdr_cbak_trns_pixel 
		All other functions are optional, but must be supplied to 
		enable a certain functionality. For example, if the transparency 
		shader has any parameters, the fz_shdr_cbak_trns_set_parameters function must be supplied. 
		It is also advisable to implement a fz_shdr_cbak_trns_pre_render function, if 
		the fz_shdr_cbak_trns_pixel function uses information which can be calculated 
		once and does not change during the course of a rendering. 
		It is important to note, that the fz_shdr_cbak_trns_pixel function is called 
		at least once for each pixel, potentially thousands of times 
		during a single rendering. The faster the fz_shdr_cbak_trns_pixel function, the faster 
		the rendering will be.

	Availability	5.0.0.0

 ****************************************************************/


#define FZ_SHDR_CBAK_TRNS_FSET_TYPE			"\xa6\x59\xde\x8b\x5c\xf9\x4d\xbf\x99\xc2\x7a\x4e\x57\xe1\x42\x0e"
#define FZ_SHDR_CBAK_TRNS_FSET_NAME			"formZ RenderZone Transparency Shader Callbacks"
#define FZ_SHDR_CBAK_TRNS_FSET_VERSION		FZPL_VERS_MAKE(6,0,0,0)

typedef struct fz_shdr_cbak_trns_fset
{
	fzpl_fset_prvt_data_td			prvt_data;

	fz_shdr_cbak_trns_uuid_func				fz_shdr_cbak_trns_uuid;
	fz_shdr_cbak_trns_name_func				fz_shdr_cbak_trns_name;
	fz_shdr_cbak_trns_version_func				fz_shdr_cbak_trns_version;
	fz_shdr_cbak_trns_set_parameters_func		fz_shdr_cbak_trns_set_parameters;
	fz_shdr_cbak_trns_pre_render_func			fz_shdr_cbak_trns_pre_render;
	fz_shdr_cbak_trns_post_render_func			fz_shdr_cbak_trns_post_render;
	fz_shdr_cbak_trns_pixel_func				fz_shdr_cbak_trns_pixel;
	fz_shdr_cbak_trns_avg_func					fz_shdr_cbak_trns_avg;
	
	
	
	fz_shdr_cbak_trns_iface_tmpl_func			fz_shdr_cbak_trns_iface_tmpl;
	fz_shdr_cbak_trns_pdf_help_func				fz_shdr_cbak_trns_pdf_help;
	
}  fz_shdr_cbak_trns_fset;



/****************************************************************

	fz_shdr_cbak_bump_uuid



	Description
		Bump shader uuid function (Required). This function is called 
		once at startup. It is expected to supply the uuid of 
		a bump shader.

	Parameters
		uuid  [Result]
			The uuid of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bump_uuid_func)(
	fzrt_UUID_td	uuid
	);

/****************************************************************

	fz_shdr_cbak_bump_name



	Description
		Bump shader name function (Required). This function is called 
		once at startup. It is expected to supply the name of 
		a bump shader, as it will appear in the Bump menu in the 
		Surface Style Parameters dialog.

	Parameters
		name  [Result]
			The name of the shader.
		max_len  [Input]
			The maximum number of characters the shader name can have.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bump_name_func)(
	char	*name,
	fzrt_int 	max_len
	);


/****************************************************************

	fz_shdr_cbak_bump_version



	Description
		Bump shader version function (Optional). This function is called 
		once at startup. It is expected to supply the version of 
		a bump shader.

	Parameters
		version  [Result]
			The version of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bump_version_func) (
	fzpl_vers_td *version
	);

/****************************************************************

	fz_shdr_cbak_bump_set_parameters



	Description
		Bump shader parameter function (Optional). This function is called 
		once at startup. It is expected to define the parameters 
		which are used by a bump shader. There are particular functions 
		available which create a certain shader parameter, such 
		as a bump, a scale factor or a boolean parameter. These 
		functions are called shdr_set_..._param and can be found 
		in the fz_shdr_fset function set.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bump_set_parameters_func)(
	void
	);

/****************************************************************

	fz_shdr_cbak_bump_pre_render



	Description
		Bump shader pre_render function (Optional). This function is called 
		once before the start of each rendering. It is expected to 
		precompute information that will be used by the fz_shdr_cbak_bump_pixel 
		function. Typically, the pre-render function will allocate 
		a data structure, fill it with precomputed information 
		and pass the pointer of the structure back to formZ via 
		the function argument. This pointer will be passed back into 
		the fz_shdr_cbak_bump_pixel function and also the post_render function, 
		which should de-allocate the structure.

	Parameters
		shdr_data  [Result]
			The pointer, which is passed to the shdr_cbak_bump_render and fz_shdr_cbak_bump_post_render callback functions 
			of a shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_bump_post_render, fz_shdr_cbak_bump_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bump_pre_render_func)(
	void** shdr_data
	);
	
/****************************************************************

	fz_shdr_cbak_bump_post_render



	Description
		Bump shader post_render function (Optional). This function is called 
		once after the end of each rendering. It is expected to 
		clean up anything that was allocated with the pre_render 
		function. In particular, if the pre_render function allocated 
		a structure and passed the pointer to the structure back to 
		formZ, the post_render function should de-allocate the 
		structure. The pointer passed back to formZ by the pre_render 
		function is passed into the post_render function.

	Parameters
		shdr_data  [Result]
			The pointer, which was created by the pre_render callback function.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_bump_pre_render, fz_shdr_cbak_bump_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bump_post_render_func)(
	void* shdr_data
	);



/****************************************************************

	fz_shdr_cbak_bump_pixel



	Description
		Bump shader main function (Required). It is 
		expected to compute the amplitude of a pixel. 
		It is called by formZ at least once for each pixel.

	Parameters
		shdr_data  [Input]
			Shader data. This is the pointer which was returned to formZ by the 
			fz_shdr_cbak_bump_pre_render API callback function. 
			It allows the plugin to pass data from the initialization stage 
			to this function. Typically, this is information, 
			which is precomputed once at rendering start.

	Returns
		The amplitude of the pixel.


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_bump_pre_render, fz_shdr_cbak_bump_post_render

 ****************************************************************/
typedef double	 (*fz_shdr_cbak_bump_pixel_func)(
	void *shdr_data
	);


/****************************************************************

	fz_shdr_cbak_bump_iface_tmpl



	Description
		Bump shader dialog function (optional). This function is called 
		when the shader dialog is invoked. It is expected to create 
		the editing items to display the content of the shader parameters.

		The dialog template will be created by formZ. Unlike other 
		interface callback functions, it is not necessary to call 
		fz_fuim_tmpl_init to create the dialog template.

		A number of utility functions are available to assist in 
		laying out the dialog for a shader. In specific they are :

		fz_shdr_get_parm_ptr :	retrieves the pointer to a shader 
		parameter. This pointer can be used 
		as input to the set range functions 
		of a fuim item. 
		fz_shdr_fuim_create_scale_items   : Creates the standard scale items 
		fz_shdr_fuim_create_noise_items   : Creates the standard noise items 
		fz_shdr_fuim_create_asample_items : Creates the standard area sample items

	Parameters
		windex  [Input]
			project window index
		fuim_tmpl  [Input]
			Pointer to the dialog template.
		shdr_ptr  [Input]
			Pointer to the bump shader.
		parent_group  [Input]
			The item group under which to construct the dialog items. 
			This group id shoud be used as the parent id for all 
			next level items created in the dialog template.

	Returns
		error code.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bump_iface_tmpl_func)(
	fzrt_int				windex,
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group
	);

/****************************************************************

	fz_shdr_cbak_bump_pdf_help



	Description
		Instructs a formZ extension to register its help data.

	Availability	6.0.0.0

 ****************************************************************/
typedef fzrt_error_td  (*fz_shdr_cbak_bump_pdf_help_func)(void);

/****************************************************************

	fz_shdr_cbak_bump_fset


	FZ_SHDR_CBAK_BUMP_FSET_TYPE
		formZ bump shader callbacks function set id.

	FZ_SHDR_CBAK_BUMP_FSET_NAME
		formZ bump shader callbacks function set name.

	FZ_SHDR_CBAK_BUMP_FSET_VERSION
		formZ bump shader callbacks function set version.

	Description
		Function set for bump shaders. The functions in this set need to 
		be supplied by the plugin or script to implement a bump shader.

		The main shader function is the fz_shdr_cbak_bump_pixel callback. It is expected 
		to compute the amplitude (height) of a surface pixel. Amplitude values 
		should  be in the range of -1.0 to +1.0 or 0.0 to +1.0. larger 
		values can be computed, but may distort the bump effect. 
		Depending on whether the shader is a 2d or 3d shader, the 2d texture 
		space coordinate (s,t) or the 3d texture space coordinate (x,y,z) 
		relating to the pixel  should be taken as the basis of the amplitude 
		computation. These coordinate values can be retrieved with the functions 
		fz_shdr_get_tspace_st (2d) or fz_shdr_get_tspace_pnt (3d). Note, that it 
		is not the absolute amplitude value of a pixel, that creates 
		a bump pattern, but the change of amplitude relative to the 
		neighboring pixels. If that change is small, the bumps appear 
		lower. If the change is rapid, the bumps appear higher.

		There are required and optional functions. The required functions 
		are : 
		fz_shdr_cbak_bump_name 
		fz_shdr_cbak_bump_pixel 
		All other functions are optional, but must be supplied to 
		enable a certain functionality. For example, if the bump 
		shader has any parameters, the fz_shdr_cbak_bump_set_parameters function must be supplied. 
		It is also advisable to implement a fz_shdr_cbak_bump_pre_render function, if 
		the fz_shdr_cbak_bump_pixel function uses information which can be calculated 
		once and does not change during the course of a rendering. 
		It is important to note, that the fz_shdr_cbak_bump_pixel function is called 
		at least once for each pixel, potentially thousands of times 
		during a single rendering. The faster the fz_shdr_cbak_bump_pixel function, the faster 
		the rendering will be.

	Availability	5.0.0.0

 ****************************************************************/


#define FZ_SHDR_CBAK_BUMP_FSET_TYPE			"\xd6\x24\x8b\xf5\x93\x80\x41\x31\x94\x39\x6b\x9f\x02\xa6\xfc\x33"
#define FZ_SHDR_CBAK_BUMP_FSET_NAME			"formZ RenderZone Bump Shader Callbacks"
#define FZ_SHDR_CBAK_BUMP_FSET_VERSION		FZPL_VERS_MAKE(6,0,0,0)

typedef struct fz_shdr_cbak_bump_fset
{
	fzpl_fset_prvt_data_td					prvt_data;

	fz_shdr_cbak_bump_uuid_func				fz_shdr_cbak_bump_uuid;
	fz_shdr_cbak_bump_name_func				fz_shdr_cbak_bump_name;
	fz_shdr_cbak_bump_version_func				fz_shdr_cbak_bump_version;
	fz_shdr_cbak_bump_set_parameters_func		fz_shdr_cbak_bump_set_parameters;
	fz_shdr_cbak_bump_pre_render_func			fz_shdr_cbak_bump_pre_render;
	fz_shdr_cbak_bump_post_render_func			fz_shdr_cbak_bump_post_render;
	fz_shdr_cbak_bump_pixel_func				fz_shdr_cbak_bump_pixel;
	
	
	
	fz_shdr_cbak_bump_iface_tmpl_func			fz_shdr_cbak_bump_iface_tmpl;
	fz_shdr_cbak_bump_pdf_help_func				fz_shdr_cbak_bump_pdf_help;
	
}  fz_shdr_cbak_bump_fset;


/****************************************************************

	fz_shdr_cbak_bgnd_uuid



	Description
		Background shader uuid function (Required). This function is called 
		once at startup. It is expected to supply the uuid of 
		a background shader.

	Parameters
		uuid  [Result]
			The uuid of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bgnd_uuid_func)(
	fzrt_UUID_td	uuid
	);

/****************************************************************

	fz_shdr_cbak_bgnd_name



	Description
		Background shader name function (Required). This function is called 
		once at startup. It is expected to supply the name of 
		a background shader, as it will appear in the Background menu in the 
		RenderZone Options dialog. A background shaders automatically also 
		becomes an environment shader, and shows up in the Environment 
		shader menu in the RenderZone Options dialog.

	Parameters
		name  [Result]
			The name of the shader.
		max_len  [Input]
			The maximum number of characters the shader name can have.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bgnd_name_func)(
	char	*name,
	fzrt_int 	max_len
	);


/****************************************************************

	fz_shdr_cbak_bgnd_version



	Description
		Background shader version function (Optional). This function is called 
		once at startup. It is expected to supply the version of 
		a background shader.

	Parameters
		version  [Result]
			The version of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bgnd_version_func) (
	fzpl_vers_td *version
	);

/****************************************************************

	fz_shdr_cbak_bgnd_set_parameters



	Description
		Background shader parameter function (Optional). This function is called 
		once at startup. It is expected to define the parameters 
		which are used by a background shader. There are particular functions 
		available which create a certain shader parameter, such 
		as a color, a scale factor or a boolean parameter. These 
		functions are called shdr_set_..._param and can be found 
		in the fz_shdr_fset function set.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bgnd_set_parameters_func)(
	void
	);

/****************************************************************

	fz_shdr_cbak_bgnd_pre_render



	Description
		Background shader pre_render function (Optional). This function is called 
		once before the start of each rendering. It is expected to 
		precompute information that will be used by the fz_shdr_cbak_bgnd_pixel 
		function. Typically, the pre-render function will allocate 
		a data structure, fill it with precomputed information 
		and pass the pointer of the structure back to formZ via 
		the function argument. This pointer will be passed back into 
		the fz_shdr_cbak_bgnd_pixel function and also the fz_shdr_cbak_bgnd_post_render function, 
		which should de-allocate the structure.

	Parameters
		shdr_data  [Result]
			The pointer, which is passed to the shdr_cbak_bgnd_render and fz_shdr_cbak_bgnd_post_render callback functions 
			of a shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_bgnd_post_render, fz_shdr_cbak_bgnd_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bgnd_pre_render_func)(
	void** shdr_data
	);
	
/****************************************************************

	fz_shdr_cbak_bgnd_post_render



	Description
		Background shader post_render function (Optional). This function is called 
		once after the end of each rendering. It is expected to 
		clean up anything that was allocated with the pre_render 
		function. In particular, if the pre_render function allocated 
		a structure and passed the pointer to the structure back to 
		formZ, the post_render function should de-allocate the 
		structure. The pointer passed back to formZ by the pre_render 
		function is passed into the post_render function.

	Parameters
		shdr_data  [Result]
			The pointer, which was created by the pre_render callback function.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_bgnd_pre_render, fz_shdr_cbak_bgnd_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bgnd_post_render_func)(
	void* shdr_data
	);



/****************************************************************

	fz_shdr_cbak_bgnd_pixel



	Description
		Background shader main function (Required). It is 
		expected to compute the color of a background pixel. 
		It is called by formZ at least once for each pixel.

	Parameters
		shdr_data  [Input]
			Shader data. This is the pointer which was returned to formZ by the 
			fz_shdr_cbak_bgnd_pre_render API callback function. 
			It allows the plugin to pass data from the initialization stage 
			to this function. Typically, this is information, 
			which is precomputed once at rendering start.

	Returns
		The color of the background  pixel.


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_bgnd_pre_render, fz_shdr_cbak_bgnd_post_render

 ****************************************************************/
typedef fz_rgb_float_td	 (*fz_shdr_cbak_bgnd_pixel_func)(
	void *shdr_data
	);

/****************************************************************

	fz_shdr_cbak_bgnd_iface_tmpl



	Description
		Background shader dialog function (optional). This function is called 
		when the shader dialog is invoked. It is expected to create 
		the editing items to display the content of the shader parameters.

		The dialog template will be created by formZ. Unlike other 
		interface callback functions, it is not necessary to call 
		fz_fuim_tmpl_init to create the dialog template.

		A number of utility functions are available to assist in 
		laying out the dialog for a shader. In specific they are :

		fz_shdr_get_parm_ptr :	retrieves the pointer to a shader 
		parameter. This pointer can be used 
		as input to the set range functions 
		of a fuim item. 
		fz_shdr_fuim_create_scale_items   : Creates the standard scale items 
		fz_shdr_fuim_create_noise_items   : Creates the standard noise items

	Parameters
		windex  [Input]
			project window index
		fuim_tmpl  [Input]
			Pointer to the dialog template.
		shdr_ptr  [Input]
			Pointer to the background shader.
		parent_group  [Input]
			The item group under which to construct the dialog items. 
			This group id shoud be used as the parent id for all 
			next level items created in the dialog template.

	Returns
		error code.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_bgnd_iface_tmpl_func)(
	fzrt_int				windex,
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group
	);

/****************************************************************

	fz_shdr_cbak_bgnd_pdf_help



	Description
		Instructs a formZ extension to register its help data.

	Availability	6.0.0.0

 ****************************************************************/
typedef fzrt_error_td  (*fz_shdr_cbak_bgnd_pdf_help_func)(void);

/****************************************************************

	fz_shdr_cbak_bgnd_fset


	FZ_SHDR_CBAK_BGND_FSET_TYPE
		formZ background shader callbacks function set id.

	FZ_SHDR_CBAK_BGND_FSET_NAME
		formZ background shader callbacks function set name.

	FZ_SHDR_CBAK_BGND_FSET_VERSION
		formZ background shader callbacks function set version.

	Description
		Function set for background shaders. The functions in this set need to 
		be supplied by the plugin or script to implement a background 
		and environment shader.

		The main shader function is the fz_shdr_cbak_bgnd_pixel callback. It is expected 
		to compute the color of a background pixel. Typically, the 
		two dimensional coordinate of a background pixel is used to 
		compute the pattern of the background. This pixel coordinate can be 
		retrieved by the function call fz_shdr_get_ispace_xy().

		There are required and optional functions. The required functions 
		are : 
		fz_shdr_cbak_bgnd_name 
		fz_shdr_cbak_bgnd_pixel 
		All other functions are optional, but must be supplied to 
		enable a certain functionality. For example, if the background 
		shader has any parameters, the fz_shdr_cbak_bgnd_set_parameters function must be supplied. 
		It is also advisable to implement a fz_shdr_cbak_bgnd_pre_render function, if 
		the fz_shdr_cbak_bgnd_pixel function uses information which can be calculated 
		once and does not change during the course of a rendering. 
		It is important to note, that the fz_shdr_cbak_bgnd_pixel function is called 
		at least once for each pixel, potentially thousands of times 
		during a single rendering. The faster the fz_shdr_cbak_bgnd_pixel function, the faster 
		the rendering will be.

	Availability	5.0.0.0

 ****************************************************************/


#define FZ_SHDR_CBAK_BGND_FSET_TYPE			"\xc8\x4f\xf2\x5c\x37\xa0\x41\x3c\xbf\xc9\xfc\xd7\x28\x20\xc3\x10"
#define FZ_SHDR_CBAK_BGND_FSET_NAME			"formZ RenderZone Background Shader Callbacks"
#define FZ_SHDR_CBAK_BGND_FSET_VERSION		FZPL_VERS_MAKE(6,0,0,0)

typedef struct fz_shdr_cbak_bgnd_fset
{
	fzpl_fset_prvt_data_td					prvt_data;

	fz_shdr_cbak_bgnd_uuid_func				fz_shdr_cbak_bgnd_uuid;
	fz_shdr_cbak_bgnd_name_func				fz_shdr_cbak_bgnd_name;
	fz_shdr_cbak_bgnd_version_func				fz_shdr_cbak_bgnd_version;
	fz_shdr_cbak_bgnd_set_parameters_func		fz_shdr_cbak_bgnd_set_parameters;
	fz_shdr_cbak_bgnd_pre_render_func			fz_shdr_cbak_bgnd_pre_render;
	fz_shdr_cbak_bgnd_post_render_func			fz_shdr_cbak_bgnd_post_render;
	fz_shdr_cbak_bgnd_pixel_func				fz_shdr_cbak_bgnd_pixel;
	
	
	
	fz_shdr_cbak_bgnd_iface_tmpl_func			fz_shdr_cbak_bgnd_iface_tmpl;
	fz_shdr_cbak_bgnd_pdf_help_func				fz_shdr_cbak_bgnd_pdf_help;
	
}  fz_shdr_cbak_bgnd_fset;



/****************************************************************

	fz_shdr_cbak_fgnd_uuid



	Description
		Depth effect shader uuid function (Required). This function is called 
		once at startup. It is expected to supply the uuid of 
		a depth effect shader.

	Parameters
		uuid  [Result]
			The uuid of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_fgnd_uuid_func)(
	fzrt_UUID_td	uuid
	);

/****************************************************************

	fz_shdr_cbak_fgnd_name



	Description
		Depth effect shader name function (Required). This function is called 
		once at startup. It is expected to supply the name of 
		a depth effect shader, as it will appear in the Depth Effect menu in the 
		RenderZone Options dialog.

	Parameters
		name  [Result]
			The name of the shader.
		max_len  [Input]
			The maximum number of characters the shader name can have.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_fgnd_name_func)(
	char	*name,
	fzrt_int 	max_len
	);


/****************************************************************

	fz_shdr_cbak_fgnd_version



	Description
		Depth effect shader version function (Optional). This function is called 
		once at startup. It is expected to supply the version of 
		a depth effect shader.

	Parameters
		version  [Result]
			The version of the shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_fgnd_version_func) (
	fzpl_vers_td *version
	);

/****************************************************************

	fz_shdr_cbak_fgnd_set_parameters



	Description
		Depth effect shader parameter function (Optional). This function is called 
		once at startup. It is expected to define the parameters 
		which are used by a depth effect shader. There are particular functions 
		available which create a certain shader parameter, such 
		as a color, a scale factor or a boolean parameter. These 
		functions are called shdr_set_..._param and can be found 
		in the fz_shdr_fset function set.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_fgnd_set_parameters_func)(
	void
	);

/****************************************************************

	fz_shdr_cbak_fgnd_pre_render



	Description
		Depth effect shader pre_render function (Optional). This function is called 
		once before the start of each rendering. It is expected to 
		precompute information that will be used by the fz_shdr_cbak_fgnd_pixel 
		function. Typically, the pre-render function will allocate 
		a data structure, fill it with precomputed information 
		and pass the pointer of the structure back to formZ via 
		the function argument. This pointer will be passed back into 
		the fz_shdr_cbak_fgnd_pixel function and also the fz_shdr_cbak_fgnd_post_render function, 
		which should de-allocate the structure.

	Parameters
		shdr_data  [Result]
			The pointer, which is passed to the fz_shdr_cbak_fgnd_pixel and fz_shdr_cbak_fgnd_post_render callback functions 
			of a shader.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_fgnd_post_render, fz_shdr_cbak_fgnd_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_fgnd_pre_render_func)(
	void** shdr_data
	);
	
/****************************************************************

	fz_shdr_cbak_fgnd_post_render



	Description
		Depth effect shader post_render function (Optional). This function is called 
		once after the end of each rendering. It is expected to 
		clean up anything that was allocated with the pre_render 
		function. In particular, if the pre_render function allocated 
		a structure and passed the pointer to the structure back to 
		formZ, the post_render function should de-allocate the 
		structure. The pointer passed back to formZ by the pre_render 
		function is passed into the post_render function.

	Parameters
		shdr_data  [Result]
			The pointer, which was created by the pre_render callback function.

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_fgnd_pre_render, fz_shdr_cbak_fgnd_pixel

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_fgnd_post_render_func)(
	void* shdr_data
	);



/****************************************************************

	fz_shdr_cbak_fgnd_pixel



	Description
		Depth effect shader main function (Required). It is expected 
		to adjust the color of a surface pixel based on the distance of 
		the pixel from the eye point.

	Parameters
		shdr_data  [Input]
			Shader data. This is the pointer which was returned to formZ by the 
			fz_shdr_cbak_fgnd_pre_render API callback function. 
			It allows the plugin to pass data from the initialization stage 
			to this function. Typically, this is information, 
			which is precomputed once at rendering start.

	Returns
		The color of the pixel.


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Shaders/sine_wave.fsl

	See Also
		fz_shdr_cbak_fgnd_pre_render, fz_shdr_cbak_fgnd_post_render

 ****************************************************************/
typedef fz_rgb_float_td	 (*fz_shdr_cbak_fgnd_pixel_func)(
	void *shdr_data
	);


/****************************************************************

	fz_shdr_cbak_fgnd_iface_tmpl



	Description
		Depth effect shader dialog function (optional). This function is called 
		when the shader dialog is invoked. It is expected to create 
		the editing items to display the content of the shader parameters.

		The dialog template will be created by formZ. Unlike other 
		interface callback functions, it is not necessary to call 
		fz_fuim_tmpl_init to create the dialog template.

		A number of utility functions are available to assist in 
		laying out the dialog for a shader. In specific they are :

		fz_shdr_get_parm_ptr :	retrieves the pointer to a shader 
		parameter. This pointer can be used 
		as input to the set range functions 
		of a fuim item. 
		fz_shdr_fuim_create_scale_items   : Creates the standard scale items 
		fz_shdr_fuim_create_noise_items   : Creates the standard noise items

	Parameters
		windex  [Input]
			project window index
		fuim_tmpl  [Input]
			Pointer to the dialog template.
		shdr_ptr  [Input]
			Pointer to the depth effect shader.
		parent_group  [Input]
			The item group under which to construct the dialog items. 
			This group id shoud be used as the parent id for all 
			next level items created in the dialog template.

	Returns
		error code.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_cbak_fgnd_iface_tmpl_func)(
	fzrt_int				windex,
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group
	);

/****************************************************************

	fz_shdr_cbak_fgnd_pdf_help



	Description
		Instructs a formZ extension to register its help data.

	Availability	6.0.0.0

 ****************************************************************/
typedef fzrt_error_td  (*fz_shdr_cbak_fgnd_pdf_help_func)(void);

/****************************************************************

	fz_shdr_cbak_fgnd_fset


	FZ_SHDR_CBAK_FGND_FSET_TYPE
		formZ depth effect shader callbacks function set id.

	FZ_SHDR_CBAK_FGND_FSET_NAME
		formZ depth effect shader callbacks function set name.

	FZ_SHDR_CBAK_FGND_FSET_VERSION
		formZ depth effect shader callbacks function set version.

	Description
		Function set for depth effect (foreground) shaders. The functions in this set need to 
		be supplied by the plugin or script to implement a foreground shader.

		The main shader function is the fz_shdr_cbak_fgnd_pixel callback. It is expected 
		to adjust the color of a surface pixel based on the distance of 
		the pixel from the eye point. Prior to the call to the depth effect 
		shader's fz_shdr_cbak_fgnd_pixel function, the color, reflection, transparency and bump 
		shader's pixel functions were called. The current color of the 
		pixel contains the value of all these shader functions. This 
		color can be retrieved with the function call fz_shdr_get_col(col). 
		The distance of the pixel from the eye point can be retrieved by 
		the function call fz_shdr_get_dist_eye_world_pnt(). If the current 
		pixel is a background pixel, the distance is a very large (i.e. 
		meaningless) number and fz_shdr_get_dist_eye_world_pnt() returns 
		FALSE. This needs to be taken into account when adjusting the 
		pixel color based on the distance.

		 
		There are required and optional functions. The required functions 
		are : 
		fz_shdr_cbak_fgnd_name 
		fz_shdr_cbak_fgnd_pixel 
		All other functions are optional, but must be supplied to 
		enable a certain functionality. For example, if the depth effect 
		shader has any parameters, the fz_shdr_cbak_fgnd_set_parameters function must be supplied. 
		It is also advisable to implement a fz_shdr_cbak_fgnd_pre_render function, if 
		the fz_shdr_cbak_fgnd_pixel function uses information which can be calculated 
		once and does not change during the course of a rendering. 
		It is important to note, that the fz_shdr_cbak_fgnd_pixel function is called 
		at least once for each pixel, potentially thousands of times 
		during a single rendering. The faster the fz_shdr_cbak_fgnd_pixel function, the faster 
		the rendering will be.

	Availability	5.0.0.0

 ****************************************************************/


#define FZ_SHDR_CBAK_FGND_FSET_TYPE			"\x7d\xa4\x8d\x1f\x5a\xb4\x4c\x33\x82\x94\xea\xc8\x3b\xba\xd6\xac"
#define FZ_SHDR_CBAK_FGND_FSET_NAME			"formZ RenderZone Depth Effect Shader Callbacks"
#define FZ_SHDR_CBAK_FGND_FSET_VERSION		FZPL_VERS_MAKE(6,0,0,0)

typedef struct fz_shdr_cbak_fgnd_fset
{
	fzpl_fset_prvt_data_td					prvt_data;

	fz_shdr_cbak_fgnd_uuid_func				fz_shdr_cbak_fgnd_uuid;
	fz_shdr_cbak_fgnd_name_func				fz_shdr_cbak_fgnd_name;
	fz_shdr_cbak_fgnd_version_func				fz_shdr_cbak_fgnd_version;
	fz_shdr_cbak_fgnd_set_parameters_func		fz_shdr_cbak_fgnd_set_parameters;
	fz_shdr_cbak_fgnd_pre_render_func			fz_shdr_cbak_fgnd_pre_render;
	fz_shdr_cbak_fgnd_post_render_func			fz_shdr_cbak_fgnd_post_render;
	fz_shdr_cbak_fgnd_pixel_func				fz_shdr_cbak_fgnd_pixel;
	
	
	
	fz_shdr_cbak_fgnd_iface_tmpl_func			fz_shdr_cbak_fgnd_iface_tmpl;
	fz_shdr_cbak_fgnd_pdf_help_func				fz_shdr_cbak_fgnd_pdf_help;
	
}  fz_shdr_cbak_fgnd_fset;



/****************************************************************

	Shaders


	Description
		formZ RenderZone shader functions. This includes functions which a plugin or script can 
		call to help in computing shader information.

		Some of these functions are usually called from within a shader extension to compute information 
		for the pixel being currently shaded.  Some of the functions are used to retrieve and set 
		parameters of the shader.  Some of the functions provide other necessary computations relevant 
		to a shaders like noise or turbulence functions.
 ****************************************************************/


/****************************************************************

	fz_shdr_set_col



	Description
		Sets the value of the current surface pixel color to a given value. 
		This function is usually not necessary as a color shader's 
		pixel function returns this color to formZ. However, if it 
		becomes necessary to set the pixel color from another shader, 
		which does not compute the pixel color (such as a transparency 
		shader), this function may be called. Beware of the side 
		effects !

	Parameters
		col  [Input]
			The pixel color

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_set_col_func) (
	fz_rgb_float_td *col
	);

/****************************************************************

	fz_shdr_get_col



	Description
		Gets the value of the current surface pixel color.

	Parameters
		col  [Result]
			The pixel color

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_get_col_func) (
	fz_rgb_float_td *col
	);

/****************************************************************

	fz_shdr_get_tspace_st



	Description
		Gets the value of the 2d texture space coordinate of a pixel. 
		This value is determined by the texture map control attribute 
		associated with a face of an object. When implementing a 
		2d (wrapped) shader, this function should be called and 
		the resulting xy value should be used to determine the 
		pattern of the shader.

		Note, that this function only has a meaningful use when 
		called from a shader's pixel function. When called from 
		any other place, the resulting xy value is undefined.

	Parameters
		st  [Result]
			The current pixel's 2d texture space coordinate

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_get_tspace_st_func)(
	fz_xy_td *st
	);

/****************************************************************

	fz_shdr_get_tspace_pnt



	Description
		Gets the value of the 3d texture space coordinate of a pixel. 
		This value is determined by the texture map control attribute 
		associated with a face of an object. The xyz value is 
		relative to the texture map control origin and is also 
		adjusted by the texture map control rotation and solid 
		size parameters. When implementing a 3d (solid) shader, this 
		function should be called and the resulting xyz value should be 
		used to determine the pattern of the shader.

		Note, that this function only has a meaningful use when 
		called from a shader's pixel function. When called from 
		any other place, the resulting xyz value is undefined.

	Parameters
		pnt  [Result]
			The current pixel's 3d texture space coordinate

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void 	 (*fz_shdr_get_tspace_pnt_func)(
	fz_xyz_td* pnt
	);
	
/****************************************************************

	fz_shdr_get_world_pnt



	Description
		Gets the value of the 3d world coordinate associated with a pixel. 
		Unlike fz_shdr_get_tspace_pnt, the xyz value returned by this 
		function is not affected by the texture map control attribute 
		of an object.

		Note, that this function only has a meaningful use when 
		called from a shader's pixel function. When called from 
		any other place, the resulting xyz value is undefined.

	Parameters
		pnt  [Result]
			The current pixel's 3d world coordinate

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_get_world_pnt_func) (
	fz_xyz_td* pnt
	);

/****************************************************************

	fz_shdr_get_world_shading_normal



	Description
		Gets the value of the 3d shading normal associated with a pixel. 
		The shading normal uses the geometric surface normal as a base. 
		It is further adjusted by the smooth shading interpolation 
		algorithm. In other words, the shading normal represents 
		the surface normal direction as seen in a smooth shaded 
		rendering. It should be used for any calculations when 
		the surface appearance is considered.

		Note, that this function only has a meaningful use when 
		called from a shader's pixel function. When called from 
		any other place, the resulting xyz value is undefined.

	Parameters
		pnt  [Result]
			The current pixel's shading normal direction

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_get_world_shading_normal_func)(
	fz_xyz_td* pnt
	);

/****************************************************************

	fz_shdr_get_world_geom_normal



	Description
		Gets the value of the 3d geometric normal associated with a pixel. 
		This normal direction is the same everywhere on a polygon. 
		Unlike the shading normal returned by fz_shdr_get_world_shading_normal 
		the geometric normal is not adjusted by the smooth shading 
		algorithm. It should be used when calculations need to be 
		performed with the true geometry.

		Note, that this function only has a meaningful use when 
		called from a shader's pixel function. When called from 
		any other place, the resulting xyz value is undefined.

	Parameters
		pnt  [Result]
			The current pixel's geometric normal direction

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_get_world_geom_normal_func)(
	fz_xyz_td* pnt
	);

/****************************************************************

	fz_shdr_get_ispace_xy



	Description
		Gets the 2d image space coordinate of the current pixel. 
		The pixel in the upper left corner of the rendering has 
		the coordinate (0.0, 0.0). The pixel in the upper right 
		corner of the rendering has the coordinate (1.0, 0.0). 
		The pixel in the lower left corner of the rendering has 
		the coordinate (0.0, 1.0). The pixel in the lower right 
		corner of the rendering has the coordinate (1.0, 1.0).

		Note, that this function only has a meaningful use when 
		called from a shader's pixel function. When called from 
		any other place, the resulting xy value is undefined.

	Parameters
		xy  [Result]
			The current pixel's image space coordinate

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void 	 (*fz_shdr_get_ispace_xy_func) (
	fz_xy_td *xy
	);

/****************************************************************

	fz_shdr_get_view_dir



	Description
		Gets the normalized vector, representing the view 
		direction, from the eye point, towards the current 
		pixel. For a perspective and panoramic rendering, this 
		direction is different for each pixel. For the other view types, 
		this direction is the same for each pixel.

		Note, that this function only has a meaningful use when 
		called from a shader's pixel function. When called from 
		any other place, the resulting xyz value is undefined.

	Parameters
		view_dir  [Result]
			The current pixel's view direction

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_get_view_dir_func) (
	fz_xyz_td* view_dir
	);

/****************************************************************

	fz_shdr_get_view_eye



	Description
		Gets the eye point from where the current view ray 
		originates. This point is not necessarily the same as 
		the eye point of the current view. In a perspective 
		view, the two are the  same. In a projection view, this 
		point is different for each pixel rendered. This is the 
		inverse of the direction of the view ray, which is 
		constant for projection views, but different for each pixel 
		in a perspective view.

		Note, that this function only has a meaningful use when 
		called from a shader's pixel function. When called from 
		any other place, the resulting xyz value is undefined.

	Parameters
		view_dir  [Result]
			The current pixel's view origin (eye point)

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_get_view_eye_func) (
	fz_xyz_td* view_dir
	);

/****************************************************************

	fz_shdr_is_in_preview



	Description
		This function returns TRUE, if the current rendering is 
		a small preview rendering in a dialog. It returns 
		FALSE otherwise. This function can only be called from 
		a shader's pre render or pixel function. This information 
		can be used to make special adjustments to a shader's 
		parameters, when rendered as a preview. For example, 
		any world size dependant parameters may be scaled to 
		fit into the preview size, which shows the world in a 
		1 x 1 unit cube.

	Returns
		TRUE if the current rendering is a small dialog preview 
		rendering, FALSE otherwise.


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_boolean	 (*fz_shdr_is_in_preview_func) (
	void
	);

/****************************************************************

	fz_shdr_get_dist_eye_world_pnt



	Description
		Gets the distance from the eye point to the 3d world 
		of the current pixel. This function is useful when 
		calculating depth effects, which are based on the 
		pixel depth.

		Note, that this function only has a meaningful use when 
		called from a shader's pixel function. When called from 
		any other place, the resulting xyz value is undefined.

	Parameters
		dist  [Result]
			The current pixel's distance from the eye point

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_int	 (*fz_shdr_get_dist_eye_world_pnt_func) (
	double* dist
	);

/****************************************************************

	fz_shdr_get_rndr_windex



	Description
		Gets the index of the window (windex) in which a rendering 
		occurs.

		Note, that this function only has a meaningful use when 
		called from a shader's pixel function or pre_render function. 
		When called from any other place, the resulting windex value is undefined.

	Parameters
		windex  [Result]
			The windex in which the current rendering occurs

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_get_rndr_windex_func) (
	fzrt_int* windex
	);

/****************************************************************

	fz_shdr_saw_tooth



	Description
		This is a simple utility function to create a sawtooth 
		effect. The first parameter (a) is divided by the 
		second parameter (b) and the floating point remainder is returned. 
		For example, if b is 1.0 this function yields the following 
		values for a : 		 
		 
		a		output	 
		0.0		0.0		 
		0.1		0.1		 
		0.9		0.9		 
		1.0		0.0		 
		1.1		0.1		 
		1.9		0.9		 
		2.0		0.0		 
		2.1		0.1		 
		2.9		0.9		 
		3.0		0.0		 
		etc.			 
		 
		This function is frequently used when calculating repetitive 
		patterns. Typically the texture space coordinates retrieved 
		by fz_shdr_get_tspace_st() are modified by fz_shdr_saw_tooth with 
		a value of 1.0 for the b argument.

	Parameters
		a  [Input]
			The input value
		b  [Input]
			The modul

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		For example :

		fz_shdr_get_tspace_st(&st); 
		st.x = fz_shdr_saw_tooth(st.x,1.0); 
		st.y = fz_shdr_saw_tooth(st.y,1.0); 
		if ( st.x * st.x + st.y * st.y > 0.25 )	col = black; 
		else									col = white;

		The above pseudo code creates a repetitive black and white dot pattern, 
		based on the texture space coordinate of a pixel.
 ****************************************************************/
typedef double	 (*fz_shdr_saw_tooth_func) (
	double a,
	double b
	);

/****************************************************************

	fz_shdr_smooth_step



	Description
		This is a simple utility function to create a smooth 
		transition of a value from and to a min and a max limit. 
		If the val parameter is less than min fz_shdr_smooth_step 
		will return 0.0. If the val parameter is greater than max 
		fz_shdr_smooth_step will return 1.0. If the val parameter is 
		between min and max, fz_shdr_smooth_step will return a 
		value between 0.0 and 1.0. However, the value is not 
		a linear interpolation, When plotted as a function 
		graph, the curve resembles a leaning S, connecting 
		y = 0.0 and y = 1.0 in a smooth fashion.

		This function can be used to create fuzz along edges 
		of sharp contrast in a pattern.

	Parameters
		min  [Input]
			The minimum value below which fz_shdr_smooth_step returns 0.0
		max  [Input]
			The maximum value above which fz_shdr_smooth_step returns 1.0
		val  [Input]
			The input value

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		For example consider a simple pattern of horizontal stripes :

		fz_shdr_get_tspace_st(&st); 
		st.y = fz_shdr_saw_tooth(st.y,1.0); 
		if ( st.y < 0.5 )	col = black; 
		else				col = white;

		This will create a crips border between the black 
		and white color. To create a fuzzy border, fz_shdr_smooth_step 
		can be used :

		fz_shdr_get_tspace_st(&st); 
		st.y = fz_shdr_saw_tooth(st.y,1.0); 
		val = fz_shdr_smooth_step(0.4,0.6,st.y); 
		col = val * white + (1.0 - val) * black;

		If st.y is less than 0.4 fz_shdr_smooth_step returns 0.0 
		and the color computation yields  :

		col = 0.0 * white + (1.0 - 0.0) * black;

		which is all black. If st.y is greater than 0.6 
		fz_shdr_smooth_step returns 1.0 and the color computation yields  :

		col = 1.0 * white + (1.0 - 1.0) * black;

		which is all white. In the zone where st.y is between 0.4 and 0.6 
		black and white are mixed. More black is used as st.y 
		approaches 0.4 and more white is used as it approaches 0.6. 
		This creates a smooth color transition from black to white.
 ****************************************************************/
typedef double	 (*fz_shdr_smooth_step_func) (
	double min,
	double max,
	double val
	);

/****************************************************************

	fz_shdr_turb_type_enum


	Description
		Turbulence type. There are three turbulence algorithms that can 
		be used : simple, better and best. They correspond directly to 
		the content of the Noise menu in many formZ shaders. The simple 
		turbulence algorithm executes fast, but may create patterns that 
		show a recognizable grid. With the better algorithm, the grid is 
		less visible. The best algorithm shows no grid at all but is also 
		the slowest, especially if a high number of impulses is used.

	Members
		FZ_SHDR_TURB_TYPE_SIMPLE
			Simple turbulence
		FZ_SHDR_TURB_TYPE_BETTER
			Better turbulence
		FZ_SHDR_TURB_TYPE_BEST
			Best turbulence

	Availability	5.0.0.0


	See Also
		fz_shdr_noise_1d, fz_shdr_noise_2d, fz_shdr_noise_3d,  
		fz_shdr_set_noise_parm, fz_shdr_turbulance_1d, fz_shdr_turbulance_2d,  
		fz_shdr_turbulance_3d

 ****************************************************************/
typedef enum fz_shdr_turb_type_enum
{
	FZ_SHDR_TURB_TYPE_SIMPLE,
	FZ_SHDR_TURB_TYPE_BETTER,
	FZ_SHDR_TURB_TYPE_BEST
	
} fz_shdr_turb_type_enum;

/****************************************************************

	fz_shdr_turbulance_1d



	Description
		This is a simple utility function to create a random 
		wiggly curve based on a single floating point input value. 
		If plotted as a graph each input value yields a value between 
		0.0 and 1.0, that, creates a smooth wiggly curve that progresses 
		more or less horizontally, but without recognizable repetitive patterns. 
		This function is similar to fz_shdr_noise_1d, but also uses 
		the passes parameter to determine how wiggly the curve becomes.

	Parameters
		x  [Input]
			The input value
		passes  [Input]
			The number of passes. The higher this value the curlier the curve becomes.
			Range: 1
		type  [Input]
			The turbulence type
		nimpulses  [Input]
			The number of impulses if type is FZ_SHDR_TURB_TYPE_BEST. The higher the 
			value, the more random the pattern. Higher values also cause this 
			function to execute slower. A value of 3 is a good default.
			Range: 1

	Returns
		noise value in the range 0.0 to 1.0


	Availability	5.0.0.0


	See Also
		fz_shdr_noise_1d

 ****************************************************************/
typedef double	 (*fz_shdr_turbulance_1d_func) (
	double	x,
	fzrt_int				passes,
	fz_shdr_turb_type_enum	type,
	fzrt_int 				nimpulses
	);

/****************************************************************

	fz_shdr_turbulance_2d



	Description
		This is a simple utility function to create a random 
		wiggly curve based on a x,y coordinate input value. 
		If plotted as a graph each input value yields a value between 
		0.0 and 1.0, that, creates a smooth wiggly curve that progresses 
		more or less horizontally, but without recognizable repetitive patterns. 
		This function is similar to fz_shdr_noise_2d, but also uses 
		the passes parameter to determine how wiggly the curve becomes.

		fz_shdr_turbulance_2d can be used to create 
		random surface patterns from 2d texture space coordinates.

	Parameters
		xy  [Input]
			The input value
		passes  [Input]
			The number of passes. The higher this value the curlier the curve becomes.
			Range: 1
		type  [Input]
			The turbulence type
		nimpulses  [Input]
			The number of impulses if type is FZ_SHDR_TURB_TYPE_BEST. The higher the 
			value, the more random the pattern. Higher values also cause this 
			function to execute slower. A value of 3 is a good default.
			Range: 1

	Returns
		turbulence value in the range 0.0 to 1.0


	Availability	5.0.0.0

	Plugin Example
		The example below creates a random pattern of black and white spots :

		fz_shdr_get_tspace_st(&st); 
		val = fz_shdr_turbulance_2d(&st,3,FZ_SHDR_TURB_TYPE_BETTER,0); 
		if ( val < 0.5 )	col = black; 
		else				col = white;

	See Also
		fz_shdr_noise_2d

 ****************************************************************/
typedef double	 (*fz_shdr_turbulance_2d_func) (
	fz_xy_td	*xy,
	fzrt_int				passes,
	fz_shdr_turb_type_enum	type,
	fzrt_int 				nimpulses
	);

/****************************************************************

	fz_shdr_turbulance_3d



	Description
		This is a simple utility function to create a random 
		wiggly curve based on a x,y,z coordinate input value. 
		If plotted as a graph each input value yields a value between 
		0.0 and 1.0, that, creates a smooth wiggly curve that progresses 
		more or less horizontally, but without recognizable repetitive patterns. 
		This function is similar to fz_shdr_noise_3d, but also uses 
		the passes parameter to determine how wiggly the curve becomes.

		fz_shdr_turbulance_3d can be used to create 
		random surface patterns from 3d world coordinates.

	Parameters
		xyz  [Input]
			The input value
		passes  [Input]
			The number of passes. The higher this value the curlier the curve becomes.
			Range: 1
		type  [Input]
			The turbulence type
		nimpulses  [Input]
			The number of impulses if type is FZ_SHDR_TURB_TYPE_BEST. The higher the 
			value, the more random the pattern. Higher values also cause this 
			function to execute slower. A value of 3 is a good default.
			Range: 1

	Returns
		turbulence value in the range 0.0 to 1.0


	Availability	5.0.0.0

	Plugin Example
		The example below creates a random pattern of black and white spots :

		fz_shdr_get_tspace_pnt(&pnt); 
		val = fz_shdr_turbulance_3d(&pnt,3,FZ_SHDR_TURB_TYPE_BETTER,0); 
		if ( val < 0.5 )	col = black; 
		else				col = white;

	See Also
		fz_shdr_noise_3d

 ****************************************************************/
typedef double	 (*fz_shdr_turbulance_3d_func) (
	fz_xyz_td	*xyz,
	fzrt_int				passes,
	fz_shdr_turb_type_enum	type,
	fzrt_int 				nimpulses
	);

/****************************************************************

	fz_shdr_noise_1d



	Description
		This is a simple utility function to create a random 
		wiggly curve based on a single floating point input value. 
		If plotted as a graph each input value yields a value between 
		0.0 and 1.0, that, creates a smooth wiggly curve that progresses 
		more or less horizontally, but without recognizable repetitive patterns. 
		This function is similar to fz_shdr_turbulance_1d, but does not use 
		the passes parameter.

	Parameters
		x  [Input]
			The input value
		type  [Input]
			The turbulence type
		nimpulses  [Input]
			The number of impulses if type is FZ_SHDR_TURB_TYPE_BEST. The higher the 
			value, the more random the pattern. Higher values also cause this 
			function to execute slower. A value of 3 is a good default.
			Range: 1

	Returns
		noise value in the range 0.0 to 1.0


	Availability	5.0.0.0


	See Also
		fz_shdr_turbulance_1d

 ****************************************************************/
typedef double	 (*fz_shdr_noise_1d_func) (
	double 				x,
	fz_shdr_turb_type_enum	type,
	fzrt_int 				nimpulses
	);

/****************************************************************

	fz_shdr_noise_2d



	Description
		This is a simple utility function to create a random 
		wiggly curve based on a x,y coordinate input value. 
		If plotted as a graph each input value yields a value between 
		0.0 and 1.0, that, creates a smooth wiggly curve that progresses 
		more or less horizontally, but without recognizable repetitive patterns. 
		This function is similar to fz_shdr_turbulance_2d, but does not use 
		the passes parameter.

		fz_shdr_noise_2d can be used to create 
		random surface patterns from 2d texture space coordinates.

	Parameters
		xy  [Input]
			The input value
		type  [Input]
			The turbulence type
		nimpulses  [Input]
			The number of impulses if type is FZ_SHDR_TURB_TYPE_BEST. The higher the 
			value, the more random the pattern. Higher values also cause this 
			function to execute slower. A value of 3 is a good default.
			Range: 1

	Returns
		noise value in the range 0.0 to 1.0


	Availability	5.0.0.0

	Plugin Example
		The example below creates a random pattern of black and white spots :

		fz_shdr_get_tspace_st(&st); 
		val = fz_shdr_noise_2d(&st,FZ_SHDR_TURB_TYPE_BETTER,0); 
		if ( val < 0.5 )	col = black; 
		else				col = white;

	See Also
		fz_shdr_turbulance_2d

 ****************************************************************/
typedef double	 (*fz_shdr_noise_2d_func) (
	fz_xy_td 				*xy,
	fz_shdr_turb_type_enum	type,
	fzrt_int 				nimpulses
	);

/****************************************************************

	fz_shdr_noise_3d



	Description
		This is a simple utility function to create a random 
		wiggly curve based on a x,y,z coordinate input value. 
		If plotted as a graph each input value yields a value between 
		0.0 and 1.0, that, creates a smooth wiggly curve that progresses 
		more or less horizontally, but without recognizable repetitive patterns. 
		This function is similar to fz_shdr_turbulance_3d, but does not use 
		the passes parameter.

		fz_shdr_noise_3d can be used to create 
		random surface patterns from 2d texture space coordinates.

	Parameters
		xyz  [Input]
			The input value
		type  [Input]
			The turbulence type
		nimpulses  [Input]
			The number of impulses if type is FZ_SHDR_TURB_TYPE_BEST. The higher the 
			value, the more random the pattern. Higher values also cause this 
			function to execute slower. A value of 3 is a good default.
			Range: 1

	Returns
		noise value in the range 0.0 to 1.0


	Availability	5.0.0.0

	Plugin Example
		The example below creates a random pattern of black and white spots :

		fz_shdr_get_tspace_pnt(&pnt); 
		val = fz_shdr_noise_3d(&pnt,FZ_SHDR_TURB_TYPE_BETTER,0); 
		if ( val < 0.5 )	col = black; 
		else				col = white;

	See Also
		fz_shdr_turbulance_3d

 ****************************************************************/
typedef double	 (*fz_shdr_noise_3d_func) (
	fz_xyz_td 				*xyz,
	fz_shdr_turb_type_enum	type,
	fzrt_int 				nimpulses
	);

/****************************************************************

	fz_shdr_set_pct_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It declares a float shader parameter, which will 
		show up in the shader options dialog as a text field with a title, 
		followed by a percentage sign. The content of the text field 
		is 100 based (i.e. an internal value of 1.0 will be displayed 
		as 100%).

		The min_flags parameter determines the acceptable lower bounds 
		of the value, that a user can type in the field. The possible values 
		are : 												 
		0 	no lower bounds are checked					 
		1 	0.0 is allowed as the lowest value			 
		2	values must be greater than 0.0				 
		 
		The max_flags parameter determines the acceptable upper bounds 
		of the value, that a user can type in the field. The possible values 
		are :												 
		0 	no upper bounds are checked					 
		1 	1.0 (100%) is allowed as the highest value	 
		2	values must be less than 1.0 (100%)			

	Parameters
		name  [Input]
			The title of the parameter, as shown in the shader options dialog
		val  [Input]
			The default value
		min_flags  [Input]
			flags to determine the lower bounds
			Range: 0
		max_flags  [Input]
			flags to determine the upper bounds
			Range: 0
		id  [Input]
			if passed in as -1, this function will create a unique id, with which 
			the value of this parameter can be retrieved using the API fz_shdr_get_parm. This id 
			will be returned by the function in its return value. If a value other than -1 is 
			passed in, it will be used as the unique id. It is the responsibility of the calling 
			code to make sure, that the id is not used again in another fz_shdr_set_xxx_parm function

	Returns
		unique id for this parameter.


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_int	 (*fz_shdr_set_pct_parm_func) (
	char 	*name,
	double	val,
	fzrt_int	min_flags,
	fzrt_int 	max_flags,
	fzrt_int	id
	);

/****************************************************************

	fz_shdr_set_col_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It declares a color shader parameter, which will 
		show up in the shader options dialog as a color box with a title.

	Parameters
		name  [Input]
			The title of the parameter, as shown in the shader options dialog
		col  [Input]
			The default color
		id  [Input]
			if passed in as -1, this function will create a unique id, with which 
			the value of this parameter can be retrieved using the API fz_shdr_get_parm. This id 
			will be returned by the function in its return value. If a value other than -1 is 
			passed in, it will be used as the unique id. It is the responsibility of the calling 
			code to make sure, that the id is not used again in another fz_shdr_set_xxx_parm function

	Returns
		unique id for this parameter.


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_set_col_parm_func) (
	char			*name,
	fz_rgb_float_td	*col,
	fzrt_int			id
	);

/****************************************************************

	fz_shdr_set_sld_flt_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It declares a float shader parameter, which will 
		show up in the shader options dialog as a slider and text field with a title, 
		followed by a percentage sign. The content of the text field 
		is 100 based (i.e. an internal value of 1.0 will be displayed 
		as 100%).

		The min_flags parameter determines the acceptable lower bounds 
		of the value, that a user can type in the field. The possible values 
		are : 												 
		0 	no lower bounds are checked					 
		1 	0.0 is allowed as the lowest value			 
		2	values must be greater than 0.0				 
		 
		The max_flags parameter determines the acceptable upper bounds 
		of the value, that a user can type in the field. The possible values 
		are :												 
		0 	no upper bounds are checked					 
		1 	1.0 (100%) is allowed as the highest value	 
		2	values must be less than 1.0 (100%)			

	Parameters
		name  [Input]
			The title of the parameter, as shown in the shader options dialog
		val  [Input]
			The default value
		min_flags  [Input]
			flags to determine the lower bounds
			Range: 0
		max_flags  [Input]
			flags to determine the upper bounds
			Range: 0
		id  [Input]
			if passed in as -1, this function will create a unique id, with which 
			the value of this parameter can be retrieved using the API fz_shdr_get_parm. This id 
			will be returned by the function in its return value. If a value other than -1 is 
			passed in, it will be used as the unique id. It is the responsibility of the calling 
			code to make sure, that the id is not used again in another fz_shdr_set_xxx_parm function

	Returns
		unique id for this parameter.


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_set_sld_flt_parm_func) (
	char 	*name,
	double	val,
	fzrt_int	min_flags,
	fzrt_int 	max_flags,
	fzrt_int	id
	);

/****************************************************************

	fz_shdr_set_sld_int_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It declares an integer shader parameter, which will 
		show up in the shader options dialog as a slider and text field with a title.

		The min_flags parameter determines the acceptable lower bounds 
		of the value, that a user can type in the field. The possible values 
		are : 												 
		0 	no lower bounds are checked					 
		1 	min is allowed as the lowest value			 
		2	values must be greater than min				 
		 
		The max_flags parameter determines the acceptable upper bounds 
		of the value, that a user can type in the field. The possible values 
		are :												 
		0 	no upper bounds are checked					 
		1 	maxis allowed as the highest value			 
		2	values must be less than max				

	Parameters
		name  [Input]
			The title of the parameter, as shown in the shader options dialog
		val  [Input]
			The default value
		min  [Input]
			The minimum value, if the range is checked
		max  [Input]
			The maximum value, if the range is checked
		min_flags  [Input]
			flags to determine the lower bounds
			Range: 0
		max_flags  [Input]
			flags to determine the upper bounds
			Range: 0
		id  [Input]
			if passed in as -1, this function will create a unique id, with which 
			the value of this parameter can be retrieved using the API fz_shdr_get_parm. This id 
			will be returned by the function in its return value. If a value other than -1 is 
			passed in, it will be used as the unique id. It is the responsibility of the calling 
			code to make sure, that the id is not used again in another fz_shdr_set_xxx_parm function

	Returns
		unique id for this parameter.


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_set_sld_int_parm_func) (
	char		*name,
	fzrt_int		val,
	fzrt_int		min,
	fzrt_int		max,
	fzrt_int		min_flags,
	fzrt_int 		max_flags,
	fzrt_int		id
	);

/****************************************************************

	fz_shdr_set_flt_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It declares a float shader parameter, which will 
		show up in the shader options dialog as a text field with a title.

		The min_flags parameter determines the acceptable lower bounds 
		of the value, that a user can type in the field. The possible values 
		are : 												 
		0 	no lower bounds are checked					 
		1 	min is allowed as the lowest value			 
		2	values must be greater than min				 
		 
		The max_flags parameter determines the acceptable upper bounds 
		of the value, that a user can type in the field. The possible values 
		are :												 
		0 	no upper bounds are checked					 
		1 	max is allowed as the highest value			 
		2	values must be less than max				

	Parameters
		name  [Input]
			The title of the parameter, as shown in the shader options dialog
		val  [Input]
			The default value
		min  [Input]
			The minimum value, if the range is checked
		max  [Input]
			The maximum value, if the range is checked
		format  [Input]
			The format in which the floating point number is displayed
		min_flags  [Input]
			flags to determine the lower bounds
			Range: 0
		max_flags  [Input]
			flags to determine the upper bounds
			Range: 0
		id  [Input]
			if passed in as -1, this function will create a unique id, with which 
			the value of this parameter can be retrieved using the API fz_shdr_get_parm. This id 
			will be returned by the function in its return value. If a value other than -1 is 
			passed in, it will be used as the unique id. It is the responsibility of the calling 
			code to make sure, that the id is not used again in another fz_shdr_set_xxx_parm function

	Returns
		unique id for this parameter.


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_set_flt_parm_func) (
	char		*name,
	double		val,
	double		min,
	double		max,
	fz_fuim_format_float_enum 	format,
	fzrt_int		min_flags,
	fzrt_int 		max_flags,
	fzrt_int		id
	);

/****************************************************************

	fz_shdr_set_int_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It declares an integer shader parameter, which will 
		show up in the shader options dialog as a text field with a title.

		The min_flags parameter determines the acceptable lower bounds 
		of the value that a user can type in the field. The possible values 
		are : 												 
		0 	no lower bounds are checked					 
		1 	min is allowed as the lowest value			 
		2	values must be greater than min				 
		 
		The max_flags parameter determines the acceptable upper bounds 
		of the value that a user can type in the field. The possible values 
		are :												 
		0 	no upper bounds are checked					 
		1 	maxis allowed as the highest value			 
		2	values must be less than max				

	Parameters
		name  [Input]
			The title of the parameter, as shown in the shader options dialog
		val  [Input]
			The default value
		min  [Input]
			The minimum value, if the range is checked
		max  [Input]
			The maximum value, if the range is checked
		min_flags  [Input]
			flags to determine the lower bounds
			Range: 0
		max_flags  [Input]
			flags to determine the upper bounds
			Range: 0
		id  [Input]
			if passed in as -1, this function will create a unique id, with which 
			the value of this parameter can be retrieved using the API fz_shdr_get_parm. This id 
			will be returned by the function in its return value. If a value other than -1 is 
			passed in, it will be used as the unique id. It is the responsibility of the calling 
			code to make sure, that the id is not used again in another fz_shdr_set_xxx_parm function

	Returns
		unique id for this parameter.


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_set_int_parm_func) (
	char		*name,
	fzrt_int		val,
	fzrt_int		min,
	fzrt_int		max,
	fzrt_int		min_flags,
	fzrt_int 		max_flags,
	fzrt_int		id
	);

/****************************************************************

	fz_shdr_set_menu_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It declares an integer shader parameter, which will 
		show up in the shader options dialog as a menu with a title. 
		The menu items are passed in as an array of strings. A horizontal 
		divider line can be created in the menu by passing a "-" as 
		a menu string.

	Parameters
		name  [Input]
			The title of the menu, as shown in the shader options dialog
		menu_str  [Input]
			An array of strings, each array item being a menu string item. If a "-" is 
			passed as a string, a horizontal menu item divider line is created.
		n_menu_str  [Input]
			The number of strings in the menu_str array
		val  [Input]
			The default value as a zero based index into the menu
		id  [Input]
			if passed in as -1, this function will create a unique id, with which 
			the value of this parameter can be retrieved using the API fz_shdr_get_parm. This id 
			will be returned by the function in its return value. If a value other than -1 is 
			passed in, it will be used as the unique id. It is the responsibility of the calling 
			code to make sure, that the id is not used again in another fz_shdr_set_xxx_parm function

	Returns
		unique id for this parameter.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_set_menu_parm_func) (
	char			*name,
	fz_string_td	*menu_str,
	fzrt_int			n_menu_str,
	fzrt_int			val,
	fzrt_int			id
	);

/****************************************************************

	fz_shdr_set_bool_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It declares a boolean shader parameter, which will 
		show up in the shader options dialog as a check box with a title.

	Parameters
		name  [Input]
			The title of the parameter, as shown in the shader options dialog
		bval  [Input]
			The default value
		id  [Input]
			if passed in as -1, this function will create a unique id, with which 
			the value of this parameter can be retrieved using the API fz_shdr_get_parm. This id 
			will be returned by the function in its return value. If a value other than -1 is 
			passed in, it will be used as the unique id. It is the responsibility of the calling 
			code to make sure, that the id is not used again in another fz_shdr_set_xxx_parm function

	Returns
		unique id for this parameter.


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_set_bool_parm_func) (
	char	*name,
	fzrt_int 	bval,
	fzrt_int	id
	);

/****************************************************************

	fz_shdr_get_parm



	Description
		This function can only be called inside the pre_render 
		or pixel callback function when implementing a plugin or script 
		shader. It retrieves the current value of a shader parameter. 
		The id argument determines which parameter of the shader 
		is accessed. The id is the same as returned by any of the 
		fz_shdr_set_xxx_parm api functions, called in the set_parameters 
		callback function. Assuming id was created with fz_shdr_set_col_parm, the color 
		parameter of a shader can be retrieved with the call :	 
		 
		fz_shdr_get_parm(id,&data);							 
		fz_type_get_rgb_float(&data,&col);					 
		 
		If possible, a shader parameter should not be retrieved in 
		the pixel callback function, but in the pre_render callback 
		function. It should then be stored in a data structure 
		allocated by the pre_render function, which is passed back 
		to formZ and passed back into the pixel function. This 
		will avoid accessing a shader parameter through an expensive 
		function call for each pixel computation.

	Parameters
		id  [Input]
			The id for this parameter. This is the id returned by any of 
			the fz_shdr_set_xxx_parm functions, or the id passed into any of the 
			fz_shdr_set_xxx_parm functions.
		data  [Result]
			parameter data

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_get_parm_func) (
	fzrt_int		id,
	fz_type_td	*data
	);

/****************************************************************

	fz_shdr_get_parm_ptr



	Description
		This function retrieves the pointer of a shader parameter. 
		The id argument determines which parameter of the shader 
		is accessed. The id is the same as returned by any of the 
		fz_shdr_set_xxx_parm API functions, called in the set_parameters 
		callback function. NULL is returned, if the id is not defined. Note, that the 
		returned point is a generic pointer. Depending on what the shader parameter 
		is declared as it may point to a double, rgb color, fzrt_int etc. It is 
		the responsibility of the calling code to use the pointer appropriately.

		This function is designed to be called in the fz_shdr_cbak_xxxx_iface_tmpl callback 
		function of a plugin shader to link the shader parameter to a fuim item.

		For example, below the parameter pointer of the shader parameter with id "3" 
		is retrieved and used to set the float range of a fuim text item. It is 
		assumed that the shader parameter was declared as a floating point parameter 
		in the set_parameters callback function.

	Parameters
		shdr  [Input]
			The shader for which to get the parameter pointer
		id  [Input]
			The id for this parameter. This is the id returned by any of 
			the fz_shdr_set_xxx_parm functions, or the id passed into any of the 
			fz_shdr_set_xxx_parm functions.
		parm_ptr  [Result]
			parameter pointer

	Returns
		none


	Availability	5.5.0.0

	Plugin Example
		fz_shdr_get_parm_ptr(shdr,3,&parm_ptr);

		g1 = fz_fuim_new_text_edit(fuim_tmpl, parent, FZ_FUIM_NONE, FZ_FUIM_FLAG_NONE, NULL,NULL); 
		fz_fuim_item_range_float(fuim_tmpl, g1, (float*)parm_ptr, 0.0, 1.0, FZ_FUIM_FORMAT_FLOAT_PERCENT,FZ_FUIM_RANGE_NONE);
 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_get_parm_ptr_func) (
	fz_shdr_ptr	shdr,
	fzrt_int		id,
	fzrt_ptr	*parm_ptr
	);


/****************************************************************

	fz_shdr_set_wrapped



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It determines whether a shader is a 2d (wrapped) shader 
		or not. Among other things, this influences where in a shader 
		menu the name of the shader is placed.

		If this function is not called, the shader is not considered to 
		be 2d.

	Parameters
		bval  [Input]
			TRUE if the shader is 2d (wrapped), FALSE otherwise.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_set_solid

 ****************************************************************/
typedef void 	 (*fz_shdr_set_wrapped_func) (
	fzrt_boolean		bval
	);

/****************************************************************

	fz_shdr_set_solid



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It determines whether a shader is a 3d (solid) shader 
		or not. Among other things, this influences where in a shader 
		menu the name of the shader is placed.

		If this function is not called, the shader is not considered to 
		be 3d.

	Parameters
		lval  [Input]
			TRUE if the shader is 3d (solid), FALSE otherwise.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_set_wrapped

 ****************************************************************/
typedef void	 (*fz_shdr_set_solid_func) (
	fzrt_boolean	lval
	);

/****************************************************************

	fz_shdr_set_area_sample_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It declares the standard area sampling parameter. No 
		further action needs to be taken by a plugin or script shader. 
		formZ will automatically create the check box in the shader 
		dialog and will automatically execute area sampling when 
		the option is selected by the user.

	Parameters
		lval  [Input]
			The default value. It should be set to FALSE to match other formZ shaders.

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_set_area_sample_parm_func) (
	fzrt_boolean		lval
	);

/****************************************************************

	fz_shdr_set_noise_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It declares the standard noise parameter. No 
		further action needs to be taken by a plugin or script shader. 
		formZ will automatically create the noise menu and text field.

		In the pixel callback function the current noise shader 
		parameters can be retrieved via fz_shdr_get_noise_type(&ntype) and 
		fz_shdr_get_noise_impulses(&nimpulse)

	Parameters
		type  [Input]
			The default noise type. It should be set to FZ_SHDR_TURB_TYPE_SIMPLE to 
			match other formZ shaders.
		nimpulse  [Input]
			The default number of impulses for the FZ_SHDR_TURB_TYPE_BEST noise type. 
			It should be set to 3 to match other formZ shaders.

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_set_noise_parm_func) (
	fz_shdr_turb_type_enum	type,
	fzrt_int				nimpulse
	);

/****************************************************************

	fz_shdr_set_scale_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		shader. It declares the standard scale parameter. No 
		further action needs to be taken by a plugin or script shader. 
		formZ will automatically create the scale title and text field. 
		formZ will also automatically scale the pattern by the scale 
		factor the user enters in the shader dialog.

	Parameters
		scale  [Input]
			The default scale factor. It should be set to 1.0 to 
			match other formZ shaders.

	Returns
		none


	Availability	5.0.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_set_scale_parm_func) (
	double		scale
	);

/****************************************************************

	fz_shdr_set_ambient_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		reflection shader. It declares the standard ambient reflection parameter. No 
		further action needs to be taken by a plugin or script shader. 
		formZ will automatically create the title, text field, map menu and options button.

		In the pixel callback function the current value of the ambient 
		reflection parameter can be retrieved via the call fz_shdr_get_ambient_factor(&val).

	Parameters
		fval  [Input]
			The default ambient factor.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_get_ambient_factor

 ****************************************************************/
typedef void	 (*fz_shdr_set_ambient_parm_func) (
	double		fval
	);

/****************************************************************

	fz_shdr_set_diffuse_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		reflection shader. It declares the standard diffuse reflection parameter. No 
		further action needs to be taken by a plugin or script shader. 
		formZ will automatically create the title, text field, map menu and options button.

		In the pixel callback function the current value of the diffuse 
		reflection parameter can be retrieved via the call fz_shdr_get_diffuse_factor(&val).

	Parameters
		fval  [Input]
			The default diffuse factor.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_get_diffuse_factor

 ****************************************************************/
typedef void	 (*fz_shdr_set_diffuse_parm_func) (
	double		fval
	);

/****************************************************************

	fz_shdr_set_specular_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		reflection shader. It declares the standard specular reflection parameter. No 
		further action needs to be taken by a plugin or script shader. 
		formZ will automatically create the title, text field, map menu and options button.

		In the pixel callback function the current value of the specular 
		reflection parameters can be retrieved via the call fz_shdr_get_specular_factor(&val) 
		and fz_shdr_get_specular_roughness(&roughness).

	Parameters
		spec_val  [Input]
			The default specular factor.
		roughness  [Input]
			The default specular roughness.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_get_specular_factor,fz_shdr_get_specular_roughness

 ****************************************************************/
typedef void	 (*fz_shdr_set_specular_parm_func) (
	double		spec_val,
	double		roughness
	);

/****************************************************************

	fz_shdr_set_specular_color_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		reflection shader. It declares the standard specular color parameter. No 
		further action needs to be taken by a plugin or script shader. 
		formZ will automatically create the title and color box.

		In the pixel callback function the current value of the specular 
		color parameters can be retrieved via the call fz_shdr_get_specular_color(&col).

	Parameters
		col  [Input]
			The default specular color.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_get_specular_color

 ****************************************************************/
typedef void	 (*fz_shdr_set_specular_color_parm_func) (
	fz_rgb_float_td	*col
	);

/****************************************************************

	fz_shdr_set_mirror_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		reflection shader. It declares the standard mirror reflection parameter. No 
		further action needs to be taken by a plugin or script shader. 
		formZ will automatically create the title, text field, map menu and options button.

		In the pixel callback function the current value of the mirror 
		reflection parameter can be retrieved via the call fz_shdr_get_mirror_factor(&val).

	Parameters
		fval  [Input]
			The default mirror factor.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_get_mirror_factor

 ****************************************************************/
typedef void	 (*fz_shdr_set_mirror_parm_func) (
	double	fval
	);

/****************************************************************

	fz_shdr_set_transmission_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		reflection shader. It declares the standard transmission reflection parameter. No 
		further action needs to be taken by a plugin or script shader. 
		formZ will automatically create the title, text field, map menu and options button.

		In the pixel callback function the current value of the transmission 
		reflection parameter can be retrieved via the call fz_shdr_get_transmission_factor(&val).

	Parameters
		trns_val  [Input]
			The default transmission factor.
		refraction  [Input]
			The default index or refraction.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_get_transmission_factor

 ****************************************************************/
typedef void	 (*fz_shdr_set_transmission_parm_func) (
	double trns_val,
	double refraction
	);

/****************************************************************

	fz_shdr_set_glow_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		reflection shader. It declares the standard glow reflection parameter. No 
		further action needs to be taken by a plugin or script shader. 
		formZ will automatically create the title, text field, map menu and options button.

		In the pixel callback function the current value of the glow 
		reflection parameter can be retrieved via the call fz_shdr_get_glow_factor(&val).

	Parameters
		fval  [Input]
			The default glow factor.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_get_glow_factor

 ****************************************************************/
typedef void	 (*fz_shdr_set_glow_parm_func) (
	double fval
	);

/****************************************************************

	fz_shdr_get_ambient_factor



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		ambient reflection parameter. This parameter must have 
		been declared in the set_parameters callback function 
		of the same shader via a call to fz_shdr_set_ambient_parm().

	Parameters
		fval  [Result]
			The current value of the ambient reflection parameter.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		Typically, the ambient factor is multiplied with the 
		result of the ambient illumination term to yield the final 
		ambient shading color. :

		fz_shdr_get_ambient_factor(&ambt_factor); 
		fz_shdr_get_ambient_term(&ambt_col); 
		ambt_col *= ambt_factor;

	See Also
		fz_shdr_set_ambient_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_ambient_factor_func) (
	double *fval
	);

/****************************************************************

	fz_shdr_get_diffuse_factor



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		diffuse reflection parameter. This parameter must have 
		been declared in the set_parameters callback function 
		of the same shader via a call to fz_shdr_set_diffuse_parm().

	Parameters
		fval  [Result]
			The current value of the diffuse reflection parameter.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		Typically, the diffuse factor is multiplied with the 
		result of the diffuse illumination term to yield the final 
		diffuse shading color. :

		fz_shdr_get_diffuse_factor(&diff_factor); 
		fz_shdr_get_diffuse_term(&diff_col); 
		diff_col *= diff_factor;

	See Also
		fz_shdr_set_diffuse_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_diffuse_factor_func) (
	double *fval
	);

/****************************************************************

	fz_shdr_get_specular_factor



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		specular reflection parameter. This parameter must have 
		been declared in the set_parameters callback function 
		of the same shader via a call to fz_shdr_set_specular_parm().

	Parameters
		fval  [Result]
			The current value of the specular reflection parameter.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		Typically, the specular factor is multiplied with the 
		result of the specular illumination term to yield the final 
		specular shading color. :

		fz_shdr_get_specular_factor(&spec_factor); 
		fz_shdr_get_specular_term(1.0 / roughness,&spec_col); 
		spec_col *= spec_factor;

	See Also
		fz_shdr_set_specular_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_specular_factor_func) (
	double *fval
	);

/****************************************************************

	fz_shdr_get_specular_roughness



	Description
		This function can only be called inside the pixel or 
		pre_render callback function when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		specular reflection parameter. This parameter must have 
		been declared in the set_parameters callback function 
		of the same shader via a call to fz_shdr_set_specular_parm().

		The function which computes the specular term, 
		fz_shdr_get_specular_term(), takes the inverse roughness 
		parameter as its first argument. In order to avoid 
		calculating 1.0 / roughness in each call of the pixel 
		function, the inverse roughness should be pre computed 
		in the pre_render function

	Parameters
		fval  [Result]
			The current value of the specular roughness parameter.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_set_specular_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_specular_roughness_func) (
	double *fval
	);

/****************************************************************

	fz_shdr_get_specular_color



	Description
		This function can only be called inside the pixel or 
		pre_render callback function when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		specular color parameter. This parameter must have 
		been declared in the set_parameters callback function 
		of the same shader via a call to fz_shdr_set_specular_color_parm().

		To avoid retrieving the specular color in each call of 
		the pixel function, it should be retrieved only once 
		in the pre_render function and passed to the pixel function 
		via a data structure created in the pre_render function.

	Parameters
		col  [Result]
			The current value of the specular color parameter.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_set_specular_color_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_specular_color_func) (
	fz_rgb_float_td *col
	);

/****************************************************************

	fz_shdr_get_mirror_factor



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		mirror reflection parameter. This parameter must have 
		been declared in the set_parameters callback function 
		of the same shader via a call to fz_shdr_set_mirror_parm().

	Parameters
		fval  [Result]
			The current value of the mirror reflection parameter.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		The mirror factor is usually multiplied with the 
		result of a raytraced mirror reflection, as shown 
		in the sample code below :

		fz_shdr_get_mirror_factor(&mirr_factor); 
		if ( mirr_factor > 0.0 ) 
		{	fz_shdr_get_world_pnt(&world_pt); 
		fz_shdr_get_world_shading_normal(&norm); 
		fz_shdr_get_view_dir(&view_vec); 
		fz_shdr_ray_reflect(&view_vec,&norm,&mirr_vec); 
		fz_shdr_raytrace_reflected(&world_pt,&mirr_vec,mirr_factor,&mirr_col); 
		mirr_col *= mirr_factor; 
		}

	See Also
		fz_shdr_set_specular_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_mirror_factor_func) (
	double *fval
	);

/****************************************************************

	fz_shdr_get_transmission_factor



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		transmission reflection parameter. This parameter must have 
		been declared in the set_parameters callback function 
		of the same shader via a call to fz_shdr_set_transmission_parm().

	Parameters
		fval  [Result]
			The current value of the transmission reflection parameter.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		The transmission factor is usually multiplied with the 
		result of a raytraced transmission, as shown 
		in the sample code below :

		fz_shdr_get_transmission_factor(&trns_factor); 
		if ( trns_factor > 0.0 ) 
		{ 
		fz_shdr_get_index_of_refraction(&eta); 
		fz_shdr_get_view_dir(&view_vec); 
		fz_shdr_get_world_shading_normal(&norm);

		if ( fz_shdr_ray_refract(&view_vec,&norm,eta,&trns_vec) == TRUE ) 
		{ 
		fz_shdr_get_world_pnt(&world_pt); 
		fz_shdr_raytrace_refracted(&world_pt,&trns_vec,trns_factor,&trns_col); 
		trns_col *= trns_factor; 
		} 
		}

	See Also
		fz_shdr_set_transmission_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_transmission_factor_func) (
	double *fval
	);

/****************************************************************

	fz_shdr_get_index_of_refraction



	Description
		This function can only be called inside the pixel or pre_render 
		callback functions when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		index of refraction parameter. This parameter must have 
		been declared in the set_parameters callback function 
		of the same shader via a call to fz_shdr_set_transmission_parm().

		Since the index of refraction is constant for a given shader during 
		a rendering, it should be retrieved in the pre_render function. 
		The index of refraction value is used as input to the function 
		fz_shdr_ray_refract, which computes the direction of a ray as 
		it enters a transmissive material.

	Parameters
		fval  [Result]
			The current value of the index of refraction parameter.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_set_transmission_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_index_of_refraction_func) (
	double *fval
	);

/****************************************************************

	fz_shdr_get_glow_factor



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		glow reflection parameter. This parameter must have 
		been declared in the set_parameters callback function 
		of the same shader via a call to fz_shdr_set_glow_parm().

	Parameters
		fval  [Result]
			The current value of the glow reflection parameter.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		The glow factor is usually used to increase the surface 
		brightness by adding more of the original pixel color 
		to the shaded pixel color. For example, a simple shading 
		calculation performed in the pixel function using 
		ambient, diffuse and glow would look like this :

		// GET THE UNSHADED PIXEL COLOR 
		fz_shdr_get_col(&org_col);

		// GET THE REFLECTION PARAMETERS 
		fz_shdr_get_ambient_factor(&ambt_factor); 
		fz_shdr_get_diffuse_factor(&diff_factor); 
		fz_shdr_get_glow_factor(&glow_factor);

		// GET THE ILLUMINATION TERMS 
		fz_shdr_get_ambient_term(&ambt_col); 
		fz_shdr_get_diffuse_term(&diff_col);

		// COMPUTE FINAL SHADED PIXEL 
		col = org_col * (ambt_factor * ambt_col + diff_factor * diff_col + glow_factor);

	See Also
		fz_shdr_set_glow_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_glow_factor_func) (
	double *fval
	);

/****************************************************************

	fz_shdr_get_ambient_term



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		ambient illumination term of a pixel.

	Parameters
		col  [Result]
			The ambient illumination color of the current pixel.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		Typically, the ambient factor is multiplied with the 
		result of the ambient illumination term to yield the final 
		ambient shading color. :

		fz_shdr_get_ambient_factor(&ambt_factor); 
		fz_shdr_get_ambient_term(&ambt_col); 
		ambt_col *= ambt_factor;

	See Also
		fz_shdr_get_ambient_factor, fz_shdr_set_ambient_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_ambient_term_func) (
	fz_rgb_float_td *col
	);

/****************************************************************

	fz_shdr_get_diffuse_term



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		diffuse illumination term of a pixel.

	Parameters
		col  [Result]
			The diffuse illumination color of the current pixel.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		Typically, the diffuse factor is multiplied with the 
		result of the diffuse illumination term to yield the final 
		diffuse shading color. :

		fz_shdr_get_diffuse_factor(&diff_factor); 
		fz_shdr_get_diffuse_term(&diff_col); 
		diff_col *= diff_factor;

	See Also
		fz_shdr_get_diffuse_factor, fz_shdr_set_diffuse_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_diffuse_term_func) (
	fz_rgb_float_td *col
	);

/****************************************************************

	fz_shdr_get_specular_term



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		reflection shader. It retrieves the current value of the 
		specular illumination term of a pixel. The first argument 
		of this function is the specular exponent, which is 
		the inverse of the roughness parameter (1.0 / roughness). 
		Since the roughness stays constant during a rendering 
		for a shader, the inverse roughness should be pre-computed 
		in the pre_render function.

	Parameters
		inv_roughness  [Input]
			The specular exponent (1.0 / roughness).
		col  [Result]
			The specular illumination color of the current pixel.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		Typically, the specular factor is multiplied with the 
		result of the specular illumination term to yield the final 
		specular shading color. :

		fz_shdr_get_specular_factor(&spec_factor); 
		fz_shdr_get_specular_term(inv_roughness,&spec_col); 
		spec_col *= spec_factor;

	See Also
		fz_shdr_get_specular_factor, fz_shdr_set_specular_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_specular_term_func) (
	double inv_roughness,
	fz_rgb_float_td *col
	);

/****************************************************************

	fz_shdr_get_noise_type



	Description
		This function can only be called inside the pixel or pre_render 
		callback function when implementing a plugin or script 
		shader. It retrieves the current value of the 
		noise type shader parameter. This parameter must have 
		been declared in the set_parameters callback function 
		of the same shader via a call to fz_shdr_set_noise_parm().

		Since the noise type stays constant for a shader during a rendering 
		it should be retrieved in the pre_render function.

	Parameters
		lval  [Result]
			The current value of the noise type parameter.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_set_noise_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_noise_type_func) (
	fz_shdr_turb_type_enum *lval
	);

/****************************************************************

	fz_shdr_get_noise_impulses



	Description
		This function can only be called inside the pixel or pre_render 
		callback function when implementing a plugin or script 
		shader. It retrieves the current value of the 
		noise number of impulses shader parameter. This parameter must have 
		been declared in the set_parameters callback function 
		of the same shader via a call to fz_shdr_set_noise_parm().

		Since the noise number of impulses stays constant for a shader during a rendering 
		it should be retrieved in the pre_render function.

	Parameters
		lval  [Result]
			The current value of the noise number of impulses parameter.

	Returns
		none


	Availability	5.0.0.0


	See Also
		fz_shdr_set_noise_parm

 ****************************************************************/
typedef void	 (*fz_shdr_get_noise_impulses_func) (
	fzrt_int *lval
	);

/****************************************************************

	fz_shdr_raytrace_reflected



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		shader, typically a reflection shader. 
		It computes the color of a reflected ray through 
		raytracing. The first argument is the world point of the 
		current pixel. This point can be retrieved by a call to 
		fz_shdr_get_world_pnt(). The second argument is the 
		direction of the ray. This is usually the reflected view direction. 
		The third argument is the mirror factor. This is usually the 
		parameter set up as a shader parameter by a call to 
		fz_shdr_set_mirror_parm() in the set_parameters callback 
		function. It helps fz_shdr_raytrace_reflected() determine 
		when to abort nested raytracing. The last argument returns 
		the color calculated by the reflected ray.

	Parameters
		wpt  [Input]
			The world point where the raytraced ray starts.
		dir  [Input]
			The direction in which the raytrace starts.
		mirr  [Input]
			The mirror factor. It indicates, how much of the color to 
			be computed by this function will be part of the final shaded 
			color of a shading calculation.
		col  [Result]
			The color calculated by the raytraced ray.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		fz_shdr_get_mirror_factor(&mirr_factor); 
		if ( mirr_factor > 0.0 ) 
		{	fz_shdr_get_world_pnt(&world_pt); 
		fz_shdr_get_world_shading_normal(&norm); 
		fz_shdr_get_view_dir(&view_vec); 
		fz_shdr_ray_reflect(&view_vec,&norm,&mirr_vec); 
		fz_shdr_raytrace_reflected(&world_pt,&mirr_vec,mirr_factor,&mirr_col); 
		mirr_col *= mirr_factor; 
		}

	See Also
		fz_shdr_ray_reflect

 ****************************************************************/
typedef fzrt_int	 (*fz_shdr_raytrace_reflected_func) (
	fz_xyz_td			*wpt,
	fz_xyz_td			*dir,
	double			mirr,
	fz_rgb_float_td	*col
	);

/****************************************************************

	fz_shdr_raytrace_refracted



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		shader, typically a reflection shader. 
		It computes the color of a refracted ray through 
		raytracing. A refracted ray usually occurs when shading 
		a glass like material, when the ray enters or exits the transmissive 
		surface. The first argument is the world point of the 
		current pixel. This point can be retrieved by a call to 
		fz_shdr_get_world_pnt(). The second argument is the 
		direction of the ray. This is usually the refracted view direction. 
		The third argument is the transmission factor. This is usually the 
		parameter set up as a shader parameter by a call to 
		fz_shdr_set_transmission_parm() in the set_parameters callback 
		function. It helps fz_shdr_raytrace_refracted() determine 
		when to abort nested raytracing. The last argument returns 
		the color calculated by the refracted ray.

	Parameters
		wpt  [Input]
			The world point where the raytraced ray starts.
		dir  [Input]
			The direction in which the raytrace starts.
		trns  [Input]
			The transmission factor. It indicates, how much of the color to 
			be computed by this function will be part of the final shaded 
			color of a shading calculation.
		col  [Result]
			The color calculated by the raytraced ray.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		fz_shdr_get_transmission_factor(&trns_factor); 
		if ( trns_factor > 0.0 ) 
		{ 
		fz_shdr_get_index_of_refraction(&eta); 
		fz_shdr_get_view_dir(&view_vec); 
		fz_shdr_get_world_shading_normal(&norm);

		if ( fz_shdr_ray_refract(&view_vec,&norm,eta,&trns_vec) == TRUE ) 
		{ 
		fz_shdr_get_world_pnt(&world_pt); 
		fz_shdr_raytrace_refracted(&world_pt,&trns_vec,trns_factor,&trns_col); 
		trns_col *= trns_factor; 
		} 
		}

	See Also
		fz_shdr_ray_refract

 ****************************************************************/
typedef fzrt_int	 (*fz_shdr_raytrace_refracted_func) (
	fz_xyz_td			*wpt,
	fz_xyz_td			*dir,
	double			trns,
	fz_rgb_float_td	*col
	);


/****************************************************************

	fz_shdr_ray_reflect



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		shader. It computes the reflected ray off the surface 
		where the current pixel is rendered. This function is 
		typically called before a call to fz_shdr_raytrace_reflected. 
		Its first parameter is the direction of the incoming ray. 
		For mirrored reflections, this is usually the current view 
		direction. The second parameter is the surface normal direction 
		at the current pixel. This normal should be retrieved by a 
		call to fz_shdr_get_world_shading_normal(). The last parameter 
		returns the reflected ray direction.

	Parameters
		vec_in  [Input]
			Direction of the incoming ray.
		norm_vec  [Input]
			Direction of surface normal.
		vec_out  [Result]
			Direction of the reflected ray.

	Returns
		none


	Availability	5.0.0.0

	Plugin Example
		fz_shdr_get_mirror_factor(&mirr_factor); 
		if ( mirr_factor > 0.0 ) 
		{	fz_shdr_get_world_pnt(&world_pt); 
		fz_shdr_get_world_shading_normal(&norm); 
		fz_shdr_get_view_dir(&view_vec); 
		fz_shdr_ray_reflect(&view_vec,&norm,&mirr_vec); 
		fz_shdr_raytrace_reflected(&world_pt,&mirr_vec,mirr_factor,&mirr_col); 
		mirr_col *= mirr_factor; 
		}

	See Also
		fz_shdr_raytrace_reflected

 ****************************************************************/
typedef void	 (*fz_shdr_ray_reflect_func) (
	fz_xyz_td *vec_in,
	fz_xyz_td *norm_vec,
	fz_xyz_td *vec_out
	);

/****************************************************************

	fz_shdr_ray_refract



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		shader. It computes the refracted ray through the surface 
		where the current pixel is rendered. This function is 
		typically called before a call to fz_shdr_raytrace_refracted. 
		Its first argument is the direction of the incoming ray. 
		For transmission refractions, this is usually the current view 
		direction. The second argument is the surface normal direction 
		at the current pixel. This normal should be retrieved by a 
		call to fz_shdr_get_world_shading_normal(). The third argument is 
		the index of refraction. The last argument returns the refracted 
		ray direction. It is possible, that the refraction calculation 
		does not yield a ray which enters through a surface. This is 
		the case, for example, when the incoming direction hits the 
		surface at a very shallow angle, such as when looking at the 
		silhouette of a glass bottle. In this case fz_shdr_ray_refract 
		will return FALSE. If TRUE is returned, the refraction calculation 
		was successful.

	Parameters
		vec_in  [Input]
			Direction of the incoming ray.
		norm_vec  [Input]
			Direction of surface normal.
		refr  [Input]
			The index of refraction.
		vec_out  [Result]
			Direction of the refracted ray.

	Returns
		TRUE if there is a refracted ray, FALSE otherwise.


	Availability	5.0.0.0

	Plugin Example
		fz_shdr_get_transmission_factor(&trns_factor); 
		if ( trns_factor > 0.0 ) 
		{ 
		fz_shdr_get_index_of_refraction(&eta); 
		fz_shdr_get_view_dir(&view_vec); 
		fz_shdr_get_world_shading_normal(&norm);

		if ( fz_shdr_ray_refract(&view_vec,&norm,eta,&trns_vec) == TRUE ) 
		{ 
		fz_shdr_get_world_pnt(&world_pt); 
		fz_shdr_raytrace_refracted(&world_pt,&trns_vec,trns_factor,&trns_col); 
		trns_col *= trns_factor; 
		} 
		}

	See Also
		fz_shdr_raytrace_refracted, fz_shdr_ray_reflect

 ****************************************************************/
typedef fzrt_boolean  (*fz_shdr_ray_refract_func) (
	fz_xyz_td *vec_in,
	fz_xyz_td *norm_vec,
	double refr,
	fz_xyz_td *vec_out
	);

/****************************************************************

	fz_shdr_ray_inside_solid



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		shader. It determines whether, during raytracing, the 
		current ray is inside a solid material or not. This is 
		usually the case, when the ray was spawned through a call 
		to fz_shdr_raytrace_refracted, and the ray has entered a 
		transmissive surface. Depending on whether a ray is 
		inside or outside a solid material, different shading 
		calculations may be performed. For example, it may not 
		be necessary to compute mirrored reflections inside 
		a solid material, when shading a glass like material.

	Returns
		TRUE if the current ray is inside a solid material, FALSE otherwise.


	Availability	5.0.0.0


	See Also
		fz_shdr_raytrace_refracted

 ****************************************************************/
typedef fzrt_boolean	 (*fz_shdr_ray_inside_solid_func) (
	void
	);

/****************************************************************

	fz_shdr_spline_color



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		shader. It computes a smoothly blended color from a 
		list of individual colors. The first argument is a 
		parametric value that must be in the range of 0.0 to 1.0. 
		For example, if there are four colors, and the fval 
		argument is below 0.25, the first color is returned. If 
		fval is around 0.25, a mixture between the first and 
		second color is returned. If it is between 0.25 and 0.5 
		the second color is returned, etc. This function can be combined with a 
		turbulence function to create a pattern of random colored spots.

	Parameters
		fval  [Input]
			The parametric value.
			Range: 0.0
		ncols  [Input]
			The number of colors in the color array.
			Range: 4
		cols  [Input]
			The color array.
		col_out  [Result]
			The computed color.

	Returns
		Error codes.


	Availability	5.0.0.0

	Plugin Example
		fz_shdr_get_tspace_st(&st); 
		val = fz_shdr_turbulance_2d(&st,3,FZ_SHDR_TURB_TYPE_BETTER,0); 
		fz_shdr_spline_color(val,5,colors_in,&col_out);

	See Also
		fz_shdr_turbulance_2d, fz_shdr_turbulance_3d, fz_shdr_noise_2d, fz_shdr_noise_3d, fz_shdr_spline_value

 ****************************************************************/
typedef fzrt_int	 (*fz_shdr_spline_color_func) (
	double			fval,
	fzrt_int			ncols,
	fz_rgb_float_td	*cols,
	fz_rgb_float_td	*col_out
	);

/****************************************************************

	fz_shdr_spline_value



	Description
		This function can only be called inside the pixel 
		callback function when implementing a plugin or script 
		shader. It computes a smoothly blended float value from a 
		list of individual float values. The first argument is a 
		parametric value that must be in the range of 0.0 to 1.0. 
		For example, if there are four values, and the fval 
		argument is below 0.25, the first float value is returned. If 
		fval is around 0.25, a mixture between the first and 
		second float value is returned. If it is between 0.25 and 0.5 
		the second float value is returned, etc. For example, 
		this function can be combined with a turbulence function to 
		create a pattern of random amplitude values for a bump shader 
		or transparency values for transparency shader.

	Parameters
		val  [Input]
			The parametric value.
			Range: 0.0
		nvals  [Input]
			The number of float values in the float array.
			Range: 4
		dvals  [Input]
			The float values array.
		val_out  [Result]
			The computed float values.

	Returns
		Error codes.


	Availability	5.0.0.0

	Plugin Example
		fz_shdr_get_tspace_st(&st); 
		val = fz_shdr_turbulance_2d(&st,3,FZ_SHDR_TURB_TYPE_BETTER,0); 
		fz_shdr_spline_value(val,5,amp_in,&amp_out);

	See Also
		fz_shdr_turbulance_2d, fz_shdr_turbulance_3d, fz_shdr_noise_2d, fz_shdr_noise_3d, fz_shdr_spline_color

 ****************************************************************/
typedef fzrt_int	 (*fz_shdr_spline_value_func) (
	double 		val,
	fzrt_int		nvals,
	double		*dvals,
	double		*val_out
	);


/****************************************************************

	fz_shdr_get_windex



	Description
		Returns the project windex index in which the current 
		rendering occurs. This function can only be called from 
		the pre render, pixel and post render function.

	Parameters
		windex  [Result]
			The project window index, in which the current 
			rendering is executed

	Returns
		Error codes.


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_get_windex_func) (
	fzrt_int		*windex
	);

/****************************************************************

	fz_shdr_get_objt_face



	Description
		Gets the objt and face that is rendered at the current pixel. If 
		the pixel does not belong to a formZ object, such as the preview object 
		in the Surface Style Parameters dialog, NULL if returned for the object 
		and -1 for findx and sym_oindx. If the pixel that is rendered belongs 
		to a formZ object, but there is no face information available, -1 
		is returned for findx. This may is the case, for example, when a 
		sphere primitive object is rendered. 
		The is_smooth_face can be used to determine, whether findx identifies 
		a face in the smooth topology or in the facetted topology. If it is 
		returned as TRUE, the findx must be interpreted as a smooth face. 
		If the object is a symbol instance, the index of the object within the 
		symbol definition can be returned as well. This index is a zero based counter. 
		To find the object in the symbol instance, the definition objects need to be 
		retrieved via the function calls fz_symb_lev_model_get_num_objts and 
		fz_symb_lev_model_get_objt. The index identifies location of the object 
		in the returned list. If the definition object contains nested symbols, 
		the objects in the nested symbol must be accounted for as well to 
		use the index properly. If the object is not a symbol instance, -1 
		is returned for sym_oindx. All function arguments are optional.

	Parameters
		objt  [Result, Optional]
			The object for the current pixel rendered, or NULL, if the pixel does not belong to an object
		findx  [Result, Optional]
			The index of the face of the object for the current pixel rendered, or -1, if the pixel does not belong to an object, or 
			if there is no face information available for the object.
		is_smooth_face  [Result, Optional]
			TRUE, if the face rendered is a smooth face, FALSE otherwise
		sym_oindx  [Result, Optional]
			the zero based counter of the definition object, to which the face belongs, if the 
			object rendered is a symbol instance. In that case, the objt argument returned will be 
			the symbol instance object.

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_get_objt_face_func) (
	fz_objt_ptr		*objt,
	fzrt_int			*findx,
	fzrt_boolean	*is_smooth_face,
	fzrt_int			*sym_oindx
	);

/****************************************************************

	fz_shdr_get_rndr_resolution



	Description
		Returns the width, height and dots per inch (dpi) 
		at which the current image is rendered. The dpi 
		setting is not important for the image resolution 
		(width and height), as those values already contain 
		the final number of pixels of the image. The dpi 
		setting may be of interest, if printing information 
		will be incorporated in the rendering. For example, if 
		a rendering needs to create a line, which will print 
		at 1mm thickness, the dpi setting is needed. 
		This function can only be called from 
		the pre render, pixel and post render function.

	Parameters
		width  [Result, Optional]
			The image width in pixels
		height  [Result, Optional]
			The image height in pixels
		dpi  [Result, Optional]
			The dots per inch setting of the image.

	Returns
		Error codes.


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_get_rndr_resolution_func) (
	fzrt_int	*width,
	fzrt_int	*height,
	fzrt_int	*dpi
	);

/****************************************************************

	fz_shdr_raytrace_depth



	Description
		Returns whether or not the current call to the shader's 
		shade pixel function is using a ray that has been 
		reflected or refracted.  If neither, the ray originates 
		from the eye.

	Parameters
		is_refl  [Result, Optional]
			Whether or not the ray has been reflected.
		is_refr  [Result, Optional]
			Whether or not the ray has been refracted.

	Returns
		Error codes.


	Availability	5.0.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_raytrace_depth_func) (
	fzrt_boolean* is_refl,
	fzrt_boolean* is_refr
	);


/****************************************************************

	fz_shdr_fuim_create_scale_items



	Description
		Creates the standard shader "Scale" interface items in a shader's 
		option dialog. This function is designed to only be called from the 
		fz_shdr_cbak_xxxx_iface_tmpl callback function of a plugin shader. 
		It cannot be called from any other context.

		The item id of the scale title and text edit field are optionally returned.

	Parameters
		fuim_tmpl  [Input]
			fuim manager
		shdr_ptr  [Input]
			the shader for which to create the interface items. The 
			shader pointer is passed to the fz_shdr_cbak_xxxx_iface_tmpl 
			callback function  and just needs to be passed on to this function.
		parent_group  [Input]
			the parent group under which to create the items. The dialog's top group 
			is passed into the fz_shdr_cbak_xxxx_iface_tmpl callback function.
		title_item_id  [Result, Optional]
			the id of the static text title item
		edit_item_id  [Result, Optional]
			the id of the text edit item

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_fuim_create_scale_items_func) (
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group,
	fzrt_int				*title_item_id,
	fzrt_int				*edit_item_id
	);
	
/****************************************************************

	fz_shdr_fuim_create_noise_items



	Description
		Creates the standard shader "Noise" interface items in a shader's 
		option dialog. This function is designed to only be called from the 
		fz_shdr_cbak_xxxx_iface_tmpl callback function of a plugin shader. 
		It cannot be called from any other context.

		The item ids of the noise menu, the impulses title and impulses text edit fields are 
		optionally returned.

	Parameters
		fuim_tmpl  [Input]
			fuim manager
		shdr_ptr  [Input]
			the shader for which to create the interface items. The 
			shader pointer is passed to the fz_shdr_cbak_xxxx_iface_tmpl 
			callback function  and just needs to be passed on to this function.
		parent_group  [Input]
			the parent group under which to create the items. The dialog's top group 
			is passed into the fz_shdr_cbak_xxxx_iface_tmpl callback function.
		menu_item_id  [Result, Optional]
			the id of the menu item
		title_item_id  [Result, Optional]
			the id of the static text title item
		edit_item_id  [Result, Optional]
			the id of the text edit item

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_fuim_create_noise_items_func) (
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group,
	fzrt_int				*menu_item_id,
	fzrt_int				*title_item_id,
	fzrt_int				*edit_item_id
	);
	
/****************************************************************

	fz_shdr_fuim_create_asample_items



	Description
		Creates the standard shader "Area Sample" interface items in a shader's 
		option dialog. This function is designed to only be called from the 
		fz_shdr_cbak_xxxx_iface_tmpl callback function of a plugin shader. 
		It cannot be called from any other context.

		The item id of the check box is optionally returned.

	Parameters
		fuim_tmpl  [Input]
			fuim manager
		shdr_ptr  [Input]
			the shader for which to create the interface items. The 
			shader pointer is passed to the fz_shdr_cbak_xxxx_iface_tmpl 
			callback function  and just needs to be passed on to this function.
		parent_group  [Input]
			the parent group under which to create the items. The dialog's top group 
			is passed into the fz_shdr_cbak_xxxx_iface_tmpl callback function.
		check_item_id  [Result, Optional]
			the id of the check box item

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_fuim_create_asample_items_func) (
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group,
	fzrt_int				*check_item_id
	);

/****************************************************************

	fz_shdr_fuim_create_ambient_items



	Description
		Creates the standard shader "Ambient Reflection" interface items in a 
		reflection shader's option dialog. This function is designed to only be called from the 
		fz_shdr_cbak_refl_iface_tmpl callback function of a reflection plugin shader. 
		It cannot be called from any other context.

	Parameters
		fuim_tmpl  [Input]
			fuim manager
		shdr_ptr  [Input]
			the shader for which to create the interface items. The 
			shader pointer is passed to the fz_shdr_cbak_refl_iface_tmpl 
			callback function  and just needs to be passed on to this function.
		parent_group  [Input]
			the parent group under which to create the items. The dialog's top group 
			is passed into the fz_shdr_cbak_refl_iface_tmpl callback function.

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_fuim_create_ambient_items_func) (
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group
	);
	
/****************************************************************

	fz_shdr_fuim_create_diffuse_items



	Description
		Creates the standard shader "Diffuse Reflection" interface items in a 
		reflection shader's option dialog. This function is designed to only be called from the 
		fz_shdr_cbak_refl_iface_tmpl callback function of a reflection plugin shader. 
		It cannot be called from any other context.

	Parameters
		fuim_tmpl  [Input]
			fuim manager
		shdr_ptr  [Input]
			the shader for which to create the interface items. The 
			shader pointer is passed to the fz_shdr_cbak_refl_iface_tmpl 
			callback function  and just needs to be passed on to this function.
		parent_group  [Input]
			the parent group under which to create the items. The dialog's top group 
			is passed into the fz_shdr_cbak_refl_iface_tmpl callback function.

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_fuim_create_diffuse_items_func) (
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group
	);

/****************************************************************

	fz_shdr_fuim_create_specular_items



	Description
		Creates the standard shader "Specular Reflection" interface items in a 
		reflection shader's option dialog. This function is designed to only be called from the 
		fz_shdr_cbak_refl_iface_tmpl callback function of a reflection plugin shader. 
		It cannot be called from any other context.

	Parameters
		fuim_tmpl  [Input]
			fuim manager
		shdr_ptr  [Input]
			the shader for which to create the interface items. The 
			shader pointer is passed to the fz_shdr_cbak_refl_iface_tmpl 
			callback function  and just needs to be passed on to this function.
		use_spec_color  [Input]
			If set to TRUE, the specular color interface items are added as well.
		parent_group  [Input]
			the parent group under which to create the items. The dialog's top group 
			is passed into the fz_shdr_cbak_refl_iface_tmpl callback function.

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_fuim_create_specular_items_func) (
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_boolean		use_spec_color,
	fzrt_int				parent_group
	);

/****************************************************************

	fz_shdr_fuim_create_mirror_items



	Description
		Creates the standard shader "Mirror Reflection" interface items in a 
		reflection shader's option dialog. This function is designed to only be called from the 
		fz_shdr_cbak_refl_iface_tmpl callback function of a reflection plugin shader. 
		It cannot be called from any other context.

	Parameters
		fuim_tmpl  [Input]
			fuim manager
		shdr_ptr  [Input]
			the shader for which to create the interface items. The 
			shader pointer is passed to the fz_shdr_cbak_refl_iface_tmpl 
			callback function  and just needs to be passed on to this function.
		parent_group  [Input]
			the parent group under which to create the items. The dialog's top group 
			is passed into the fz_shdr_cbak_refl_iface_tmpl callback function.

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_fuim_create_mirror_items_func) (
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group
	);

/****************************************************************

	fz_shdr_fuim_create_transmission_items



	Description
		Creates the standard shader "Transmission Reflection" interface items in a 
		reflection shader's option dialog. This function is designed to only be called from the 
		fz_shdr_cbak_refl_iface_tmpl callback function of a reflection plugin shader. 
		It cannot be called from any other context.

	Parameters
		fuim_tmpl  [Input]
			fuim manager
		shdr_ptr  [Input]
			the shader for which to create the interface items. The 
			shader pointer is passed to the fz_shdr_cbak_refl_iface_tmpl 
			callback function  and just needs to be passed on to this function.
		parent_group  [Input]
			the parent group under which to create the items. The dialog's top group 
			is passed into the fz_shdr_cbak_refl_iface_tmpl callback function.

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_fuim_create_transmission_items_func) (
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group
	);

/****************************************************************

	fz_shdr_fuim_create_glow_items



	Description
		Creates the standard shader "Glow Reflection" interface items in a 
		reflection shader's option dialog. This function is designed to only be called from the 
		fz_shdr_cbak_refl_iface_tmpl callback function of a reflection plugin shader. 
		It cannot be called from any other context.

	Parameters
		fuim_tmpl  [Input]
			fuim manager
		shdr_ptr  [Input]
			the shader for which to create the interface items. The 
			shader pointer is passed to the fz_shdr_cbak_refl_iface_tmpl 
			callback function  and just needs to be passed on to this function.
		parent_group  [Input]
			the parent group under which to create the items. The dialog's top group 
			is passed into the fz_shdr_cbak_refl_iface_tmpl callback function.

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_fuim_create_glow_items_func) (
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group
	);

/****************************************************************

	fz_shdr_fuim_create_specular_roughness_items



	Description
		Creates the standard shader "Roughness" interface items in a 
		reflection shader's option dialog. This function is designed to only be called from the 
		fz_shdr_cbak_refl_iface_tmpl callback function of a reflection plugin shader. 
		It cannot be called from any other context.

	Parameters
		fuim_tmpl  [Input]
			fuim manager
		shdr_ptr  [Input]
			the shader for which to create the interface items. The 
			shader pointer is passed to the fz_shdr_cbak_refl_iface_tmpl 
			callback function  and just needs to be passed on to this function.
		parent_group  [Input]
			the parent group under which to create the items. The dialog's top group 
			is passed into the fz_shdr_cbak_refl_iface_tmpl callback function.
		title_item_id  [Result, Optional]
			the id of the static text title item
		slider_item_id  [Result, Optional]
			the id of the slider item
		edit_item_id  [Result, Optional]
			the id of the text edit item

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_fuim_create_specular_roughness_items_func) (
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group,
	fzrt_int				*title_item_id,
	fzrt_int				*slider_item_id,
	fzrt_int				*edit_item_id
	);
/****************************************************************

	fz_shdr_fuim_create_trans_refraction_items



	Description
		Creates the standard shader "Refraction" interface items in a 
		reflection shader's option dialog. This function is designed to only be called from the 
		fz_shdr_cbak_refl_iface_tmpl callback function of a reflection plugin shader. 
		It cannot be called from any other context.

	Parameters
		fuim_tmpl  [Input]
			fuim manager
		shdr_ptr  [Input]
			the shader for which to create the interface items. The 
			shader pointer is passed to the fz_shdr_cbak_refl_iface_tmpl 
			callback function  and just needs to be passed on to this function.
		parent_group  [Input]
			the parent group under which to create the items. The dialog's top group 
			is passed into the fz_shdr_cbak_refl_iface_tmpl callback function.
		title_item_id  [Result, Optional]
			the id of the static text title item
		edit_item_id  [Result, Optional]
			the id of the text edit item
		menu_item_id  [Result, Optional]
			the id of the menu item

	Returns
		Error codes.


	Availability	5.5.0.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_fuim_create_trans_refraction_items_func) (
	fz_fuim_tmpl_ptr	fuim_tmpl,
	fz_shdr_ptr			shdr_ptr,
	fzrt_int				parent_group,
	fzrt_int				*title_item_id,
	fzrt_int				*edit_item_id,
	fzrt_int				*menu_item_id
	);

/****************************************************************

	fz_shdr_set_parm_anim_id



	Description
		Assocatiates a unique id (UUID) with a shader parameter for animation purposes. It 
		allows the animation module to distiguish this shader parameter from other shader 
		parameters. The uuid MUST be different from any other uuid's used. if this function 
		is called for a parameter is can be animated by the user. Otherwise, the 
		parameter cannot be animated.

	Parameters
		id  [Input]
			the user's id, which identifies the shader. This is the same id 
			as the oine passed in to the various fz_shdr_set_xxx_parm functions.
		uuid  [Input]
			The uuid for the parameter.

	Returns
		Error codes.


	Availability	6.0.0.2

 ****************************************************************/
typedef fzrt_error_td	 (*fz_shdr_set_parm_anim_id_func) (
	fzrt_int				id,
	fzrt_UUID_td		uuid
	);

/****************************************************************

	fz_shdr_ambient_occl_contrast



	Description
		Scales the original ambient factor (ambt_factor_in) by the ambient 
		occlusion factor at the current pixel and returns it in ambt_factor_out. 
		The ambient occlusion factor is also returned in ambt_occl_factor. This 
		arguments needs to be passed to fz_shdr_ambient_occl_addtl_contrast for 
		the computation of the additional ambient occlusion contrast. See 
		fz_shdr_ambient_occl_addtl_contrast for more details.

	Parameters
		ambt_factor_in  [Input]
			The original ambient factor used by the shader. This is usually 
			the value returned by fz_shdr_get_ambient_factor.
		ambt_factor_out  [Result]
			The ambient factor which has been scaled by the ambient 
			occlusion factor, which is calculated at the current pixel. This 
			value needs to be used in the ambient illumination calculation, 
			instead of the original ambient factor.
		ambt_occl_factor  [Result]
			The ambient occlusion factor at the current pixel. This value 
			needs to be passed into fz_shdr_ambient_occl_addtl_contrast.

	Returns
		Error codes.


	Availability	6.5.0.0

 ****************************************************************/
typedef void	 (*fz_shdr_ambient_occl_contrast_func) (
	double				ambt_factor_in,
	double				*ambt_factor_out,
	double				*ambt_occl_factor
	);

/****************************************************************

	fz_shdr_ambient_occl_addtl_contrast



	Description
		Scales the surface color by additional ambient occlusion contrast. The 
		original (unscaled) ambient factor is passed in, as well as the ambient 
		occlusion factor calculated by fz_shdr_ambient_occl_contrast. Note, that 
		fz_shdr_ambient_occl_contrast and fz_shdr_ambient_occl_addtl_contrast are 
		designed to be called together. The first calculates the ambient occlusion 
		contrast between maximum ambient illumination (no occlusion) and no ambient 
		illumination (maxiumum occlusion). This contrasts is multiplied into the 
		ambient factor argument passed to fz_shdr_ambient_occl_contrast. The 
		scaled ambient factor can now be used in the traditional illumination calculation 
		of a pixel. In order to add additional darkness to areas that have no ambient illumination, 
		but still appear to bright, fz_shdr_ambient_occl_addtl_contrast is called. It further 
		scales the pixel color towards black, based on the ambt_occl_factor calculated by 
		fz_shdr_ambient_occl_contrast and the amount of additional contrast selected by the user. 
		Therefore, the typical illumination calculation code should be wrapped by those 
		two function calls as shown in the code example. Note, that if a reflection shader 
		also calculates mirrored reflections and glass like transmission, the shading 
		contributed from those calculations to the pixel color should occur after 
		the call to fz_shdr_ambient_occl_addtl_contrast. 
		This is necessary, since the mirrored contribution, is not subject to ambient 
		illumination. For example, in a perfect mirror, one would not want to see 
		any ambient shading.

		If the reflection shader choses to handle ambient occlusion with these 
		extra function calls, it is also necessary to tell formZ, that this is done. 
		Therefore, in the shader's fz_shdr_cbak_refl_set_parameters callback, the ambient parameter 
		needs to be set up with the api call fz_shdr_set_ambient_occl_parm instead of 
		fz_shdr_set_ambient_parm.

		In summary, if the reflection shader is simple and only calculates basic 
		diffuse and ambient illumination, it is ok to not deal with ambient occlusion. 
		formZ will handle it automatically. However, if the reflection shader handles 
		more complex illumination, such as refelction and transmission, it is best to 
		handle ambient oacclusion locally as described above. The glossy sample reflection shader 
		serves as a good example.

	Parameters
		col  [Input, Result]
			The pixel color, which is to be shaded by additional ambient occlusion.
		ambt_factor_org  [Input]
			The original ambient factor, as returned by fz_shdr_get_ambient_factor.
		ambt_occl_factor  [Input]
			The ambient occlusion factor calculated by  fz_shdr_ambient_occl_contrast.

	Returns
		Error codes.


	Availability	6.5.0.0

	Plugin Example
		fz_shdr_ambient_occl_contrast(ambt_factor,&ambt_factor_new,&ambt_occl_factor);

		col = surf_col * (ambt_factor_new * ambient_light) + diff_factor * diff_light;

		fz_shdr_ambient_occl_addtl_contrast(col, ambt_factor, ambt_occl_factor);
	Script Example
		fz_shdr_ambient_occl_contrast(ambt_factor,ambt_factor_new,ambt_occl_factor);

		col = surf_col * (ambt_factor_new * ambient_light) + diff_factor * diff_light;

		fz_shdr_ambient_occl_addtl_contrast(col, ambt_factor, ambt_occl_factor); 
 ****************************************************************/
typedef void	 (*fz_shdr_ambient_occl_addtl_contrast_func) (
	fz_rgb_float_td 	*col,
	double				ambt_factor_org,
	double				ambt_occl_factor
	);

/****************************************************************

	fz_shdr_set_ambient_occl_parm



	Description
		This function can only be called inside the set_parameters 
		callback function when implementing a plugin or script 
		reflection shader. It declares the standard ambient reflection parameter. No 
		further action needs to be taken by a plugin or script shader. 
		formZ will automatically create the title, text field, map menu and options button. 
		Note, that this function is the same as fz_shdr_set_ambient_parm, except that 
		it tells formZ, that the reflection shader handles ambient occlution 
		in its fz_shdr_cbak_refl_pixel callback function. For more details, see 
		fz_shdr_ambient_occl_contrast and fz_shdr_ambient_occl_addtl_contrast.

		In the pixel callback function the current value of the ambient 
		reflection parameter can be retrieved via the call fz_shdr_get_ambient_factor(&val).

	Parameters
		fval  [Input]
			The default ambient factor.

	Returns
		none


	Availability	6.5.0.0


	See Also
		fz_shdr_get_ambient_factor,fz_shdr_ambient_occl_contrast,fz_shdr_ambient_occl_addtl_contrast

 ****************************************************************/
typedef void	 (*fz_shdr_set_ambient_occl_parm_func) (
	double		fval
	);


/****************************************************************

	fz_shdr_fset


	FZ_SHDR_FSET_TYPE
		Rendering shader function set UUID.

	FZ_SHDR_FSET_NAME
		RenderZone shader function set name.

	FZ_SHDR_FSET_VERSION
		RenderZone shader function set version.

	Description
		Rendering shader function set. It contains functions which 
		can be called by a plugin or script shader to facilitate 
		shading calculations and to define shader parameters.

	Availability	5.0.0.0

 ****************************************************************/


#define FZ_SHDR_FSET_TYPE		"\x78\x28\x1c\x60\xff\x44\x41\xde\x8d\x90\xc2\x26\xd4\xbe\x9c\x34"

#define FZ_SHDR_FSET_NAME		"formZ RenderZone Shader Functions"

#define FZ_SHDR_FSET_VERSION		FZPL_VERS_MAKE(6,5,0,0)

typedef struct fz_shdr_fset
{
	fzpl_fset_prvt_data_td					prvt_data;
	
	fz_shdr_set_col_func					fz_shdr_set_col;
	
	fz_shdr_get_col_func					fz_shdr_get_col;
	fz_shdr_get_tspace_st_func				fz_shdr_get_tspace_st;
	fz_shdr_get_tspace_pnt_func				fz_shdr_get_tspace_pnt;
	fz_shdr_get_world_pnt_func				fz_shdr_get_world_pnt;
	fz_shdr_get_world_shading_normal_func	fz_shdr_get_world_shading_normal;
	fz_shdr_get_world_geom_normal_func		fz_shdr_get_world_geom_normal;
	fz_shdr_get_ispace_xy_func				fz_shdr_get_ispace_xy;
	fz_shdr_get_view_dir_func				fz_shdr_get_view_dir;
	fz_shdr_get_dist_eye_world_pnt_func		fz_shdr_get_dist_eye_world_pnt;
	fz_shdr_get_rndr_windex_func			fz_shdr_get_rndr_windex;
	fz_shdr_get_view_eye_func				fz_shdr_get_view_eye;
	fz_shdr_get_windex_func					fz_shdr_get_windex;
	fz_shdr_get_rndr_resolution_func		fz_shdr_get_rndr_resolution;
	fz_shdr_is_in_preview_func				fz_shdr_is_in_preview;
	
	fz_shdr_saw_tooth_func					fz_shdr_saw_tooth;
	fz_shdr_smooth_step_func				fz_shdr_smooth_step;
	fz_shdr_turbulance_1d_func				fz_shdr_turbulance_1d;
	fz_shdr_turbulance_2d_func				fz_shdr_turbulance_2d;
	fz_shdr_turbulance_3d_func				fz_shdr_turbulance_3d;
	fz_shdr_noise_1d_func					fz_shdr_noise_1d;
	fz_shdr_noise_2d_func					fz_shdr_noise_2d;
	fz_shdr_noise_3d_func					fz_shdr_noise_3d;
	fz_shdr_raytrace_reflected_func			fz_shdr_raytrace_reflected;
	fz_shdr_raytrace_refracted_func			fz_shdr_raytrace_refracted;
	fz_shdr_ray_reflect_func				fz_shdr_ray_reflect;
	fz_shdr_ray_refract_func				fz_shdr_ray_refract;
	fz_shdr_ray_inside_solid_func			fz_shdr_ray_inside_solid;
	fz_shdr_spline_color_func				fz_shdr_spline_color;
	fz_shdr_spline_value_func				fz_shdr_spline_value;
	
	fz_shdr_set_pct_parm_func				fz_shdr_set_pct_parm;
	fz_shdr_set_col_parm_func				fz_shdr_set_col_parm;
	fz_shdr_set_sld_flt_parm_func			fz_shdr_set_sld_flt_parm;
	fz_shdr_set_sld_int_parm_func			fz_shdr_set_sld_int_parm;
	fz_shdr_set_flt_parm_func				fz_shdr_set_flt_parm;
	fz_shdr_set_int_parm_func				fz_shdr_set_int_parm;
	fz_shdr_set_bool_parm_func				fz_shdr_set_bool_parm;
	fz_shdr_set_wrapped_func				fz_shdr_set_wrapped;
	fz_shdr_set_solid_func					fz_shdr_set_solid;
	fz_shdr_set_area_sample_parm_func		fz_shdr_set_area_sample_parm;
	fz_shdr_set_noise_parm_func				fz_shdr_set_noise_parm;
	fz_shdr_set_scale_parm_func				fz_shdr_set_scale_parm;
	fz_shdr_set_ambient_parm_func			fz_shdr_set_ambient_parm;
	fz_shdr_set_diffuse_parm_func			fz_shdr_set_diffuse_parm;
	fz_shdr_set_specular_parm_func			fz_shdr_set_specular_parm;
	fz_shdr_set_specular_color_parm_func	fz_shdr_set_specular_color_parm;
	fz_shdr_set_mirror_parm_func			fz_shdr_set_mirror_parm;
	fz_shdr_set_transmission_parm_func		fz_shdr_set_transmission_parm;
	fz_shdr_set_glow_parm_func				fz_shdr_set_glow_parm;
	
	fz_shdr_get_ambient_factor_func			fz_shdr_get_ambient_factor;
	fz_shdr_get_diffuse_factor_func			fz_shdr_get_diffuse_factor;
	fz_shdr_get_specular_factor_func		fz_shdr_get_specular_factor;
	fz_shdr_get_specular_roughness_func		fz_shdr_get_specular_roughness;
	fz_shdr_get_specular_color_func			fz_shdr_get_specular_color;
	fz_shdr_get_mirror_factor_func			fz_shdr_get_mirror_factor;
	fz_shdr_get_transmission_factor_func	fz_shdr_get_transmission_factor;
	fz_shdr_get_index_of_refraction_func	fz_shdr_get_index_of_refraction;
	fz_shdr_get_glow_factor_func			fz_shdr_get_glow_factor;
	fz_shdr_get_ambient_term_func			fz_shdr_get_ambient_term;
	fz_shdr_get_diffuse_term_func			fz_shdr_get_diffuse_term;
	fz_shdr_get_specular_term_func			fz_shdr_get_specular_term;
	fz_shdr_get_noise_type_func				fz_shdr_get_noise_type;
	fz_shdr_get_noise_impulses_func			fz_shdr_get_noise_impulses;
	
	fz_shdr_get_parm_func					fz_shdr_get_parm;

	fz_shdr_raytrace_depth_func				fz_shdr_raytrace_depth;
	
	
	
	fz_shdr_set_menu_parm_func							fz_shdr_set_menu_parm;
	fz_shdr_get_parm_ptr_func							fz_shdr_get_parm_ptr;
	
	fz_shdr_fuim_create_scale_items_func				fz_shdr_fuim_create_scale_items;
	fz_shdr_fuim_create_noise_items_func				fz_shdr_fuim_create_noise_items;
	fz_shdr_fuim_create_asample_items_func				fz_shdr_fuim_create_asample_items;
	fz_shdr_fuim_create_ambient_items_func				fz_shdr_fuim_create_ambient_items;
	fz_shdr_fuim_create_diffuse_items_func				fz_shdr_fuim_create_diffuse_items;
	fz_shdr_fuim_create_specular_items_func				fz_shdr_fuim_create_specular_items;
	fz_shdr_fuim_create_mirror_items_func				fz_shdr_fuim_create_mirror_items;
	fz_shdr_fuim_create_transmission_items_func			fz_shdr_fuim_create_transmission_items;
	fz_shdr_fuim_create_glow_items_func					fz_shdr_fuim_create_glow_items;
	fz_shdr_fuim_create_specular_roughness_items_func	fz_shdr_fuim_create_specular_roughness_items;
	fz_shdr_fuim_create_trans_refraction_items_func		fz_shdr_fuim_create_trans_refraction_items;
	fz_shdr_get_objt_face_func							fz_shdr_get_objt_face;
	
	
	
	fz_shdr_set_parm_anim_id_func						fz_shdr_set_parm_anim_id;
	


	fz_shdr_ambient_occl_contrast_func					fz_shdr_ambient_occl_contrast;
	fz_shdr_ambient_occl_addtl_contrast_func			fz_shdr_ambient_occl_addtl_contrast;
	fz_shdr_set_ambient_occl_parm_func					fz_shdr_set_ambient_occl_parm;
	
	
}  fz_shdr_fset;

#ifdef __cplusplus
}
#endif
		
#endif

