--Bug fixes

-Fix possible OpenCL bugs in cubic3D, cubicLattice3D, dc_cube, falloff, falloff2, falloff3, waffle.

--Code changes
 -Upgrade to Visual Studio 2019.
This commit is contained in:
Person
2020-04-11 20:07:12 -07:00
parent 8da0774652
commit 39414b2263
44 changed files with 26386 additions and 106 deletions

View File

@ -37,7 +37,7 @@ static void sincos(float x, float* s, float* c)
namespace EmberNs
{
#define EMBER_VERSION "1.0.0.19"
#define EMBER_VERSION "1.0.0.20"
//#define FLAM3_COMPAT 1//Uncomment this if you want full compatibility with flam3 regarding some of the trig-based variations in Variations01.h
#define EPS6 T(1e-6)
#define EPS std::numeric_limits<T>::epsilon()//Apoplugin.h uses -20, but it's more mathematically correct to do it this way.

View File

@ -1778,6 +1778,7 @@ public:
<< "\t\t r = fma(MwcNext01(mwc), 1 - " << yThickness << ", MwcNextRange(mwc, (int)" << slices << ") + " << yThickness << ") / " << slices << ";\n"
<< "\t\t break;\n"
<< "\t\t case 4:\n"
<< "\t\t default:\n"
<< "\t\t a = fma(MwcNext01(mwc), (1 - " << xThickness << "), MwcNextRange(mwc, (int)" << slices << ") + " << xThickness << ") / " << slices << ";\n"
<< "\t\t r = MwcNext01(mwc);\n"
<< "\t\t break;\n"

View File

@ -773,7 +773,7 @@ public:
"\t\t vOut.z = val3 - " << halfweight << ";\n"
"\t\t break;\n"
"\t\t case 7:\n"
"\t\t default:\n"
"\t\t default:\n"
"\t\t vOut.x = val1 - " << halfweight << ";\n"
"\t\t vOut.y = val2 - " << halfweight << ";\n"
"\t\t vOut.z = val3 - " << halfweight << ";\n"
@ -1024,7 +1024,7 @@ public:
<< "\t\t vOut.z = pztz - " << weight << ";\n"
<< "\t\t break;\n"
<< "\t\t case 7:\n"
<< "\t\t default:\n"
<< "\t\t default:\n"
<< "\t\t vOut.x = pxtx - " << weight << ";\n"
<< "\t\t vOut.y = pyty - " << weight << ";\n"
<< "\t\t vOut.z = pztz - " << weight << ";\n"
@ -2550,6 +2550,7 @@ public:
<< "\t\t vOut.z = rad * sigmas;\n"
<< "\t\t break;\n"
<< "\t\t case 2:\n"
<< "\t\t default:\n"
<< "\t\t scale = clamp(rs, (real_t)(0.0), (real_t)(0.9)) + (real_t)(0.1);\n"
<< "\t\t denom = 1 / scale;\n"
<< "\t\t vOut.x = fma(" << weight << ", Lerp(vIn.x, fma(scale, ax, floor(vIn.x * denom)), " << mulX << " * rs), " << mulX << " * pow(ax, " << boxPow << ") * rs * denom);\n"
@ -2746,6 +2747,7 @@ public:
<< "\t\t }\n"
<< "\t\t break;\n"
<< "\t\t case 2:\n"
<< "\t\t default:\n"
<< "\t\t {\n"
<< "\t\t real_t sigma = dist * randy * M_2PI;\n"
<< "\t\t real_t phi = dist * randz * MPI;\n"
@ -2975,6 +2977,7 @@ public:
<< "\t\t }\n"
<< "\t\t break;\n"
<< "\t\tcase 2:\n"
<< "\t\tdefault:\n"
<< "\t\t {\n"
<< "\t\t real_t coeff = " << rMax << " <= EPS ? dist : fma(" << alpha << ", (LogMap(dist) - dist), dist);\n"
<< "\n"

View File

@ -310,6 +310,7 @@ public:
<< "\n"
<< "\t\t break;\n"
<< "\t\t case 2:\n"
<< "\t\t default:\n"
<< "\t\t x = " << weight << " * p;\n"
<< "\t\t y = " << weight << " * q;\n"
<< "\t\t z = " << weight << " * (j ? -1 : 1);\n"