formZ SDK | 4.0 Call Back Reference | RenderZone Shader

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 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 (col). A number of basic shading utility functions are supplied by the fz_shdr_fset function set. For example, can be called to compute the diffuse shading component of a pixel.
There are required and optional functions. The required functions are : All other functions are optional, but must be supplied to enable a certain functionality. For example, if the reflection shader has any parameters, the function must be supplied. It is also advisable to implement a function, if the 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 function is called at least once for each pixel, potentially thousands of times during a single rendering. The faster the function, the faster the rendering will be.
If the 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

Functions:

fz_shdr_cbak_refl_iface_tmpl

fz_shdr_cbak_refl_name

fz_shdr_cbak_refl_pdf_help

fz_shdr_cbak_refl_pixel

fz_shdr_cbak_refl_post_render

fz_shdr_cbak_refl_pre_render

fz_shdr_cbak_refl_set_parameters

fz_shdr_cbak_refl_uuid

fz_shdr_cbak_refl_version

Defined in

fz_rzne_shdr_api.h