Go to the documentation of this file.
26 #ifndef AVFILTER_PERLIN_H
27 #define AVFILTER_PERLIN_H
enum FFPerlinRandomMode random_mode
define how to compute the permutations array
double period
spatial repeat period, if negative it is ignored
@ FF_PERLIN_RANDOM_MODE_NB
@ FF_PERLIN_RANDOM_MODE_SEED
Perlin generator context.
double ff_perlin_get(FFPerlin *perlin, double x, double y, double z)
Compute Perlin noise given the x, y, z coordinates.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option keep it simple and lowercase description are in without period
int ff_perlin_init(FFPerlin *perlin, double period, int octaves, double persistence, enum FFPerlinRandomMode random_mode, unsigned int random_seed)
Initialize the Perlin noise generator with parameters.
unsigned int random_seed
when random_mode is set FF_PERLIN_RANDOM_MODE_RANDOM, set random seed used to compute the permutation...
int octaves
total number of components making up the noise, each one with doubled frequency
double persistence
ratio used to compute the amplitude of the next octave component with respect to the previous compone...
@ FF_PERLIN_RANDOM_MODE_KEN
@ FF_PERLIN_RANDOM_MODE_RANDOM
uint8_t permutations[512]
permutations array used to compute the Perlin noise hash