--User changes

-Remove Hue as a saved parameter, as well as animation parameters associated with it. It's now a GUI-only field that is never saved.
 -Make histogram, density filter buffer, and all associated fields always float, even when using double. In that case, only the iteration calculations are now double. Suggested by Thomas Ludwig.
 -Print all three kernels in EmberRender when the --dump_kernel option is specified.
 -Apply variations filter to randoms.

--Bug fixes
 -Fix bug where hue was not being preserved when switching controllers and embers. Very hard to repro bug, but mostly overcome by eliminating hue as a saved parameter.

--Code changes
 -De-templatized DEOpenCLKernelCreator and FinalAccumOpenCLKernelCreator. They now just take a bool as a parameter to specify double precision.
 -To accommodate the buffers being float, introduce a new #define types in EmberCL called real4_bucket, and real4reals_bucket.
 -Density and spatial filtering structs now use this type.
 -ConvertDensityFilter() and ConvertSpatialFilter() no longer return a value, they just assign to the member.
This commit is contained in:
mfeemster
2015-08-10 20:10:23 -07:00
parent 6b702334b9
commit eecd3c254f
38 changed files with 695 additions and 771 deletions

View File

@ -384,12 +384,8 @@ public:
}
else//Randomize palette only.
{
Palette<T> palette;
if (m_PaletteList.Size())
palette = *m_PaletteList.GetRandomPalette();
palette.MakeHueAdjustedPalette(ember.m_Palette, ember.m_Hue);
ember.m_Palette = *m_PaletteList.GetRandomPalette();
//If the palette retrieval fails, skip the mutation.
if (ember.m_Palette.m_Index >= 0)
@ -398,8 +394,7 @@ public:
}
else
{
palette.Clear(false);
ember.m_Palette = palette;
ember.m_Palette.Clear(false);
cout << "Failure getting random palette, palette set to white\n";
}
}
@ -638,12 +633,10 @@ public:
};
ember.Clear();
ember.m_Hue = (m_Rand.Rand() & 7) ? 0 : m_Rand.Frand01<T>();
if (m_PaletteList.Size())
palette = *m_PaletteList.GetRandomPalette();
ember.m_Palette = *m_PaletteList.GetRandomPalette();
palette.MakeHueAdjustedPalette(ember.m_Palette, ember.m_Hue);
ember.m_Time = 0;
ember.m_Interp = EMBER_INTERP_LINEAR;
ember.m_PaletteInterp = INTERP_HSV;
@ -922,16 +915,9 @@ public:
if (changePalette)
{
Palette<T>* palette = nullptr;
ember.m_Hue = 0.0;
if (m_PaletteList.Size())
palette = m_PaletteList.GetRandomPalette();
if (palette)
{
palette->MakeHueAdjustedPalette(ember.m_Palette, ember.m_Hue);
ember.m_Palette = *m_PaletteList.GetRandomPalette();
}
else
{