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

fz_shdr_set_sld_flt_parm

Description

This function can only be called inside the set_parameters callback function when implementing a plugin or script shader. It declares a float shader parameter, which will show up in the shader options dialog as a slider and text field with a title, followed by a percentage sign. The content of the text field is 100 based (i.e. an internal value of 1.0 will be displayed as 100%).
The min_flags parameter determines the acceptable lower bounds of the value, that a user can type in the field. The possible values are :
0 no lower bounds are checked
1 0.0 is allowed as the lowest value
2 values must be greater than 0.0

The max_flags parameter determines the acceptable upper bounds of the value, that a user can type in the field. The possible values are :
0 no upper bounds are checked
1 1.0 (100%) is allowed as the highest value
2 values must be less than 1.0 (100%)

Plugin Prototype

fzrt_error_td fz_shdr_set_sld_flt_parm(

char *

name,

double

val,

fzrt_int

min_flags,

fzrt_int

max_flags,

fzrt_int

id )

Parameters

name [Input]

The title of the parameter, as shown in the shader options dialog

val [Input]

The default value

min_flags [Input]

flags to determine the lower bounds

Range: 0 <= min_flags <= 2

max_flags [Input]

flags to determine the upper bounds

Range: 0 <= max_flags <= 2

id [Input]

if passed in as -1, this function will create a unique id, with which the value of this parameter can be retrieved using the API . This id will be returned by the function in its return value. If a value other than -1 is passed in, it will be used as the unique id. It is the responsibility of the calling code to make sure, that the id is not used again in another fz_shdr_set_xxx_parm function

Returns

unique id for this parameter.

Availability

5.0.0.0

Function Set

fz_shdr_fset


Defined in

fz_rzne_shdr_api.h