mirror of
https://github.com/minetest/minetest.git
synced 2024-11-09 17:23:45 +01:00
updated noise stuff
This commit is contained in:
parent
91cfbe2891
commit
2bd2bdff08
@ -238,7 +238,11 @@ double noise3d_param(const NoiseParams ¶m, double x, double y, double z)
|
|||||||
y /= s;
|
y /= s;
|
||||||
z /= s;
|
z /= s;
|
||||||
|
|
||||||
if(param.type == NOISE_PERLIN)
|
if(param.type == NOISE_CONSTANT_ONE)
|
||||||
|
{
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
else if(param.type == NOISE_PERLIN)
|
||||||
{
|
{
|
||||||
return param.noise_scale*noise3d_perlin(x,y,z, param.seed,
|
return param.noise_scale*noise3d_perlin(x,y,z, param.seed,
|
||||||
param.octaves,
|
param.octaves,
|
||||||
|
@ -82,10 +82,11 @@ double noise3d_perlin_abs(double x, double y, double z, int seed,
|
|||||||
|
|
||||||
enum NoiseType
|
enum NoiseType
|
||||||
{
|
{
|
||||||
|
NOISE_CONSTANT_ONE,
|
||||||
NOISE_PERLIN,
|
NOISE_PERLIN,
|
||||||
NOISE_PERLIN_ABS,
|
NOISE_PERLIN_ABS,
|
||||||
NOISE_PERLIN_CONTOUR,
|
NOISE_PERLIN_CONTOUR,
|
||||||
NOISE_PERLIN_CONTOUR_FLIP_YZ
|
NOISE_PERLIN_CONTOUR_FLIP_YZ,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct NoiseParams
|
struct NoiseParams
|
||||||
|
Loading…
Reference in New Issue
Block a user