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

# 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, (), 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

Plugin Prototype

void fz_shdr_get_specular_roughness(

double * | fval )

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

Function Set

fz_shdr_fset

Defined in

fz_rzne_shdr_api.h