diff options
author | Daniel Garcia <danielgarcia@gmail.com> | 2014-06-01 02:51:46 +0400 |
---|---|---|
committer | Daniel Garcia <danielgarcia@gmail.com> | 2014-06-01 02:51:46 +0400 |
commit | da2d05616b5e82cd722ed7ae850b3b0208672fc5 (patch) | |
tree | 7c05101a67ece2d9c20c3d2689980bf44f0b6d13 /noise.h | |
parent | 063c9371f7d8a41accea98fe385ab6f449cdc438 (diff) |
Adding 8 and 16 bit simplex noise implementations to the library. The 8 bit version can do over 30,000 noise points per second, the 16 bit version over 15,000. Also, add a debugging FPS counter to FastLED.
Diffstat (limited to 'noise.h')
-rw-r--r-- | noise.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/noise.h b/noise.h new file mode 100644 index 00000000..07d12226 --- /dev/null +++ b/noise.h @@ -0,0 +1,20 @@ +#ifndef __INC_NOISE_H +#define __INC_NOISE_H + +// 16 bit, fixed point implementation of perlin's Simplex Noise. Coordinates are +// 16.16 fixed point values, 32 bit integers with integral coordinates in the high 16 +// bits and fractional in the low 16 bits, and the function takes 1d, 2d, and 3d coordinate +// values. +extern uint16_t inoise16(uint32_t x, uint32_t y, uint32_t z); +extern uint16_t inoise16(uint32_t x, uint32_t y); +extern uint16_t inoise16(uint32_t x); + +// 8 bit, fixed point implementation of perlin's Simplex Noise. Coordinates are +// 8.8 fixed point values, 16 bit integers with integral coordinates in the high 8 +// bits and fractional in the low 8 bits, and the function takes 1d, 2d, and 3d coordinate +// values. +extern uint8_t inoise8(uint16_t x, uint16_t y, uint16_t z); +extern uint8_t inoise8(uint16_t x, uint16_t y); +extern uint8_t inoise8(uint16_t x); + +#endif |