protected override bool CalculateVoxel(Voxel voxel, int x, int y, int z) { float noiseValue = noiseFunction.Sample3D(offset.x + x / (float)width, y / (float)height, offset.y + z / (float)length); voxel.Data = noiseValue; return(true); }
static float NoiseGen(INoise noise, int oct, float x, float y, float z) { float value = 0.0f; int i; for (i = 0; i < oct; i++) { value += noise.Sample3D( x * Mathf.Pow(2, i), y * Mathf.Pow(2, i), z * Mathf.Pow(2, i) ); } return(value); }