尽力了,写的我有点恶心
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
#ifndef TERRAIN_NOISE_H
|
||||
#define TERRAIN_NOISE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// 双线性值噪声:在整数格点取随机值,格点之间用 smoothstep 插值,输出 0–1
|
||||
double value_noise(uint64_t seed, int type, double x, double y, double scale);
|
||||
|
||||
// 分形噪声:多个倍频叠加,输出 0–1
|
||||
double fractal_noise(uint64_t seed, int type, double x, double y,
|
||||
double scale, int octaves, double persistence);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user