--User changes

-Add new variations: crackle, dc_perlin.
 -Make default palette interp mode be linear instead of step.
 -Make summary tab the selected one in the Info tab.
 -Allow for highlight power of up to 10. It was previously limited to 2.

--Bug fixes
 -Direct color calculations were wrong.
 -Flattening was not applied to final xform.
 -Fix "pure virtual function call" error on shutdown.

--Code changes
 -Allow for array precalc params in variations by adding a size member to the ParamWithName class.
  -In IterOpenCLKernelCreator, memcpy precalc params instead of a direct assign since they can now be of variable length.
 -Add new file VarFuncs to consolidate some functions that are common to multiple variations. This also contains texture data for crackle and dc_perlin.
  -Place OpenCL versions of these functions in the FunctionMapper class in the EmberCL project.
 -Add new Singleton class that uses CRTP, is thread safe, and deletes after the last reference goes away. This fixes the usual "delete after main()" problem with singletons that use the static local function variable pattern.
 -Began saving files with AStyle autoformatter turned on. This will eventually touch all files as they are worked on.
 -Add missing backslash to CUDA include and library paths for builds on Nvidia systems.
 -Add missing gl.h include for Windows.
 -Remove glew include paths from Fractorium, it's not used.
 -Remove any Nvidia specific #defines and build targets, they are no longer needed with OpenCL 1.2.
 -Fix bad paths on linux build.
 -General cleanup.
This commit is contained in:
mfeemster
2015-12-31 13:41:59 -08:00
parent 914b5412c3
commit 6ba16888e3
57 changed files with 3444 additions and 2433 deletions

View File

@ -124,7 +124,6 @@ public:
//Original returned false if all were 0, but it's allowed here
//which will just end up setting all elements to 0 which means
//only the first xform will get used.
//Calculate how much of a fraction of a the total density each element represents.
size_t j = 0;
//These must be double, else roundoff error will prevent the last element of m_XformDistributions from being set.
@ -147,9 +146,11 @@ public:
while (tempDensity < currentDensityLimit && j < CHOOSE_XFORM_GRAIN)
{
#ifdef _DEBUG
//Ensure distribution contains no out of bounds indices.
if (byte(i) >= ember.XformCount())
throw "Out of bounds xform index in selection distribution.";
#endif
//printf("offset = %d, xform = %d, running sum = %f\n", j, i, tempDensity);
m_XformDistributions[(distrib * CHOOSE_XFORM_GRAIN) + j] = byte(i);
@ -159,10 +160,16 @@ public:
}
#ifdef _DEBUG
//Ensure every element of the distribution was populated.
if (j < CHOOSE_XFORM_GRAIN)
throw "Not all distribution elements set, undefined behavior.";
#endif
for (; j < CHOOSE_XFORM_GRAIN; j++)//Make absolutely sure they are set to a valid value.
m_XformDistributions[(distrib * CHOOSE_XFORM_GRAIN) + j] = byte(i - 1);
//Flam3 did this, which gives the same result.
//T t = xforms[0].m_Weight;
//
@ -217,7 +224,6 @@ protected:
firstBadPoint.m_Z = 0;
firstBadPoint.m_ColorX = point->m_ColorX;
firstBadPoint.m_VizAdjusted = point->m_VizAdjusted;
xformIndex = NextXformFromIndex(rand.Rand());
if (!xforms[xformIndex].Apply(&firstBadPoint, point, rand))
@ -250,7 +256,6 @@ protected:
if (IsClose<T>(ember.FinalXform()->m_Opacity, 1) || rand.Frand01<T>() < ember.FinalXform()->m_Opacity)
{
T tempVizAdjusted = tempPoint.m_VizAdjusted;
ember.NonConstFinalXform()->Apply(&tempPoint, sample, rand);
sample->m_VizAdjusted = tempVizAdjusted;
}
@ -282,7 +287,7 @@ protected:
template <typename T>
class EMBER_API StandardIterator : public Iterator<T>
{
ITERATORUSINGS
ITERATORUSINGS
public:
/// <summary>
/// Empty constructor.
@ -405,7 +410,7 @@ public:
template <typename T>
class EMBER_API XaosIterator : public Iterator<T>
{
ITERATORUSINGS
ITERATORUSINGS
public:
/// <summary>
/// Empty constructor.
@ -439,7 +444,6 @@ public:
firstBadPoint.m_Z = 0;
firstBadPoint.m_ColorX = point->m_ColorX;
firstBadPoint.m_VizAdjusted = point->m_VizAdjusted;
xformIndex = NextXformFromIndex(rand.Rand(), lastXformUsed);
if (!xforms[xformIndex].Apply(&firstBadPoint, point, rand))