From 2bd2bdff082197698accee1a2a4b52c7a5539b3e Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 26 Jun 2011 18:50:13 +0300 Subject: [PATCH] updated noise stuff --- src/noise.cpp | 6 +++++- src/noise.h | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/noise.cpp b/src/noise.cpp index b755a824..9c2141ce 100644 --- a/src/noise.cpp +++ b/src/noise.cpp @@ -238,7 +238,11 @@ double noise3d_param(const NoiseParams ¶m, double x, double y, double z) y /= 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, param.octaves, diff --git a/src/noise.h b/src/noise.h index c8d8985c..ed75f316 100644 --- a/src/noise.h +++ b/src/noise.h @@ -82,10 +82,11 @@ double noise3d_perlin_abs(double x, double y, double z, int seed, enum NoiseType { + NOISE_CONSTANT_ONE, NOISE_PERLIN, NOISE_PERLIN_ABS, NOISE_PERLIN_CONTOUR, - NOISE_PERLIN_CONTOUR_FLIP_YZ + NOISE_PERLIN_CONTOUR_FLIP_YZ, }; struct NoiseParams -- 2.30.2