formZ SDK | 5.0 API Reference | Project | Modeling | Rendering | Shaders
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().
Plugin Prototype
void fz_shdr_get_specular_factor(
double * | fval ) |
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
Function Set
Defined in