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 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.
Plugin Prototype
void fz_shdr_get_specular_term(
double | inv_roughness, |
col ) |
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
Function Set
Defined in