formZ SDK | 5.0 API Reference | Project | Modeling | Rendering | Render Materials

fz_shdr_ptr_set_parm

Description

Sets a parameter of a render shader. The parameter is identified by parm_id and is enumerated for each shader.

See the description of the function fz_shdr_ptr_get_parm for details about the shaders parameters.

Note : the tmap pointer of texture map based shaders and the reflection map pointer of reflection shader can only be retrieved with fz_shdr_ptr_get_parm but not set with fz_shdr_ptr_set_parm.
To match the value of the Roughness parameter of a reflection shader to what the dialog interface does, you need to square the value passed in. For example, if the dialog shows 10% (i.e. 0.1) and you want to set it to the same value you need to pass in 0.1 * 0.1 (= 0.01). The reason for this is, that the dialog applies an exponential scaling of the value entered by the user.

Plugin Prototype

fzrt_error_td fz_shdr_ptr_set_parm(

fzrt_int

windex,

fz_shdr_ptr

shdr,

fzrt_int

parm_id,

fz_type_td *

data )

Parameters

windex [Input]

project window index

shdr [Input]

shader

parm_id [Input]

parameter identifier

data [Input]

parameter data

Returns

Error codes

Availability

5.0.0.0

Example Files

util_attr_rmtl.fsl
util_rmtl.fsl

Function Set

fz_rmtl_fset


Defined in

fz_rmtl_api.h