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

fz_shdr_turbulance_1d

Description

This is a simple utility function to create a random wiggly curve based on a single floating point input value. If plotted as a graph each input value yields a value between 0.0 and 1.0, that, creates a smooth wiggly curve that progresses more or less horizontally, but without recognizable repetitive patterns. This function is similar to , but also uses the passes parameter to determine how wiggly the curve becomes.

Plugin Prototype

double fz_shdr_turbulance_1d(

double

x,

fzrt_int

passes,

fz_shdr_turb_type_enum

type,

fzrt_int

nimpulses )

Parameters

x [Input]

The input value

passes [Input]

The number of passes. The higher this value the curlier the curve becomes.

Range: 1 <= passes <= 10

type [Input]

The turbulence type

nimpulses [Input]

The number of impulses if type is FZ_SHDR_TURB_TYPE_BEST. The higher the value, the more random the pattern. Higher values also cause this function to execute slower. A value of 3 is a good default.

Range: 1 <= nimpulses <= 10

Returns

noise value in the range 0.0 to 1.0

Availability

5.0.0.0

See Also

Function Set

fz_shdr_fset


Defined in

fz_rzne_shdr_api.h