better mandelbulber

This commit is contained in:
proller 2014-01-21 17:32:04 +04:00
parent 1dba30e580
commit 3cd48fd139
3 changed files with 44 additions and 34 deletions

View File

@ -1,6 +1,6 @@
#
# make new patch:
# diff -EbBw --normal -u src/mandelbulber/ ../freeminer_release/src/mandelbulber/| grep -v "Only in" > util/mandelbulber.patch
# diff -EbBw --normal -u src/mandelbulber/ ../mandelbulber-read-only/src | grep -v "Only in" > util/mandelbulber.patch
#
FIND_PATH(MANDELBULBER_PATH NAMES fractal.h PATHS ${PROJECT_SOURCE_DIR}/mandelbulber NO_DEFAULT_PATH)

View File

@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "json/json.h"
#if USE_MANDELBULBER
#define MANDELBULBER_EMBEDDED
#include "util/mathconstants.h"
//#include "mandelbulber/algebra.cpp"
#include "mandelbulber/fractal.h"

View File

@ -1,99 +1,108 @@
diff -EbBw --normal -u src/mandelbulber/fractal.cpp ../freeminer_release/src/mandelbulber/fractal.cpp
--- src/mandelbulber/fractal.cpp 2013-12-29 04:41:45.000000000 +0400
+++ ../freeminer_release/src/mandelbulber/fractal.cpp 2013-12-29 03:16:40.000000000 +0400
@@ -9,9 +9,11 @@
diff -EbBw --normal -u src/mandelbulber/fractal.cpp ../mandelbulber-read-only/src/fractal.cpp
--- src/mandelbulber/fractal.cpp 2014-01-21 16:41:20.000000000 +0400
+++ ../mandelbulber-read-only/src/fractal.cpp 2014-01-21 16:34:55.000000000 +0400
@@ -9,11 +9,9 @@
/
********************************************************/
+/*
-#ifndef MANDELBULBER_EMBEDDED
#include "Render3D.h"
#include "interface.h"
#include "primitives.h"
+*/
-#endif
#include <stdlib.h>
unsigned int MixNumbers(double a, double b, double c)
@@ -1191,6 +1193,7 @@
@@ -1174,7 +1172,7 @@
distance = z.Length();
if (distance > 1e15)
{
- distance = (L - log(log(r) / log((double)N)) / log(p))/100.0;
+ distance = (L - log(log(r) / log(N)) / log(p))/100.0;
break;
}
}
@@ -1193,7 +1191,6 @@
}
//************ return values *****************
+/*
-#ifndef MANDELBULBER_EMBEDDED
N_counter += L + 1;
Loop_counter++;
@@ -1198,6 +1201,7 @@
@@ -1201,7 +1198,6 @@
histogram[L]++;
else
histogram[63]++;
+*/
-#endif
if (iter_count != NULL)
*iter_count = L;
@@ -1240,6 +1244,7 @@
@@ -1244,7 +1240,6 @@
}
}
+#if 0
-#ifndef MANDELBULBER_EMBEDDED
//******************* Calculate distance *******************8
double CalculateDistance(CVector3 point, sFractal &params, bool *max_iter)
@@ -1446,6 +1451,7 @@
@@ -1451,7 +1446,6 @@
}
return distance;
}
+#endif
-#endif
// force template instantiation
template double Compute<normal>(CVector3, const sFractal&, int*);
diff -EbBw --normal -u src/mandelbulber/fractal.h ../freeminer_release/src/mandelbulber/fractal.h
--- src/mandelbulber/fractal.h 2013-12-29 04:41:45.000000000 +0400
+++ ../freeminer_release/src/mandelbulber/fractal.h 2013-12-29 03:14:11.000000000 +0400
@@ -14,7 +14,9 @@
diff -EbBw --normal -u src/mandelbulber/fractal.h ../mandelbulber-read-only/src/fractal.h
--- src/mandelbulber/fractal.h 2014-01-21 16:40:14.000000000 +0400
+++ ../mandelbulber-read-only/src/fractal.h 2014-01-21 16:34:56.000000000 +0400
@@ -14,9 +14,7 @@
#include <vector>
#include "common_math.h"
+/*
-#ifndef MANDELBULBER_EMBEDDED
#include "fractparams.h"
+*/
-#endif
#include <stddef.h>
#include <string>
diff -EbBw --normal -u src/mandelbulber/fractparams.h ../freeminer_release/src/mandelbulber/fractparams.h
--- src/mandelbulber/fractparams.h 2013-12-29 04:41:45.000000000 +0400
+++ ../freeminer_release/src/mandelbulber/fractparams.h 2013-12-29 03:13:34.000000000 +0400
@@ -13,7 +13,9 @@
diff -EbBw --normal -u src/mandelbulber/fractparams.h ../mandelbulber-read-only/src/fractparams.h
--- src/mandelbulber/fractparams.h 2014-01-21 16:42:32.000000000 +0400
+++ ../mandelbulber-read-only/src/fractparams.h 2014-01-21 16:34:55.000000000 +0400
@@ -13,9 +13,7 @@
#define FRACTPARAMS_H_
#include "fractal.h"
+/*
-#ifndef MANDELBULBER_EMBEDDED
#include "texture.hpp"
+*/
-#endif
struct sParamRenderD
{
@@ -58,7 +60,9 @@
@@ -60,9 +58,7 @@
double primitiveInvertedSphereReflect;
double primitiveWaterReflect;
+/*
-#ifndef MANDELBULBER_EMBEDDED
sImageAdjustments imageAdjustments;
+*/
-#endif
CVector3 vp; //view point
CVector3 auxLightPre[4];
@@ -109,6 +113,7 @@
@@ -114,7 +110,6 @@
bool quiet;
bool fishEyeCut;
bool fakeLightsEnabled;
+/*
-#ifndef MANDELBULBER_EMBEDDED
sImageSwitches imageSwitches;
sRGB background_color1; //background colour
@@ -138,6 +143,7 @@
@@ -144,7 +139,6 @@
cTexture *backgroundTexture;
cTexture *envmapTexture;
cTexture *lightmapTexture;
+*/
-#endif
std::vector<enumFractalFormula> formulaSequence;
std::vector<double> hybridPowerSequence;