formZ SDK | 5.0 API Reference | Project | Modeling | Rendering | Shaders

# 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 , which computes the direction of a ray as it enters a transmissive material.

Plugin Prototype

void fz_shdr_get_index_of_refraction(

double * | fval )

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

Function Set

fz_shdr_fset

Defined in

fz_rzne_shdr_api.h