FastLED 3.9.15
Loading...
Searching...
No Matches

◆ fill_raw_noise8()

void fill_raw_noise8 ( fl::u8 * pData,
fl::u8 num_points,
fl::u8 octaves,
fl::u16 x,
int scalex,
fl::u16 time )

Fill a 1D 8-bit buffer with noise, using inoise8()

Parameters
pDatathe array of data to fill with noise values
num_pointsthe number of points of noise to compute
octavesthe number of octaves to use for noise. More octaves = more noise.
xx-axis coordinate on noise map (1D)
scalexthe scale (distance) between x points when filling in noise
timethe time position for the noise field

Definition at line 675 of file noise.cpp.hpp.

675 {
676 fl::u32 _xx = x;
677 fl::u32 scx = scale;
678 for(int o = 0; o < octaves; ++o) {
679 for(int i = 0,xx=_xx; i < num_points; ++i, xx+=scx) {
680 pData[i] = qadd8(pData[i],inoise8(xx,time)>>o);
681 }
682
683 _xx <<= 1;
684 scx <<= 1;
685 }
686}
int x
Definition simple.h:92
fl::UISlider scale("Scale", 4,.1, 4,.1)
uint8_t octaves
fl::u8 inoise8(fl::u16 x, fl::u16 y, fl::u16 z)

References inoise8(), octaves, scale, and x.

Referenced by fill_noise16(), and fill_noise8().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: