--Bug fixes

-Fix variations: blob2 (broken on CPU), epispiral, hole.
 -Fix reading variations from Apophysis: supershape.
 -Bump render was broken.

--Code changes
 -Flip precalc sina/cosa and apply everywhere by flipping the usage. Flam3 had these reversed and it made the code confusing to read.
This commit is contained in:
Person
2019-12-27 21:04:41 -08:00
parent 35d4eb3464
commit 0b0405382f
25 changed files with 192 additions and 148 deletions

View File

@ -58,7 +58,7 @@
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Fractorium 1.0.0.17&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;http://fractorium.com&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;fractorium.com&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Fractorium 1.0.0.18&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;http://fractorium.com&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;fractorium.com&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
@ -79,7 +79,7 @@
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
<set>Qt::NoTextInteraction</set>
</property>
</widget>
<widget class="QWidget" name="verticalLayoutWidget">

View File

@ -111,26 +111,30 @@ FinalRenderEmberController<T>::FinalRenderEmberController(FractoriumFinalRenderD
m_GuiState = m_FinalRenderDialog->State();//Cache render settings from the GUI before running.
size_t i = 0;
bool doAll = m_GuiState.m_DoAll && m_EmberFile.Size() > 1;
bool isBump = !doAll && m_IsQualityBump && m_GuiState.m_Strips == 1;//Should never get called with m_IsQualityBump otherwise, but check one last time to be safe.
size_t currentStripForProgress = 0;//Sort of a hack to get the strip value to the progress function.
QString path = doAll ? ComposePath(QString::fromStdString(m_EmberFile.m_Embers.begin()->m_Name)) : ComposePath(Name());
QString backup = path + "_backup.flame";
//Save backup Xml.
if (doAll)
m_XmlWriter.Save(backup.toStdString().c_str(), m_EmberFile.m_Embers, 0, true, false, true, false, false);
else
m_XmlWriter.Save(backup.toStdString().c_str(), *m_Ember, 0, true, false, true, false, false);
m_FinishedImageCount.store(0);
Pause(false);
SyncGuiToRenderer();
FirstOrDefaultRenderer()->m_ProgressParameter = reinterpret_cast<void*>(&currentStripForProgress);//When animating, only the first (primary) device has a progress parameter.
m_GuiState.m_Strips = VerifyStrips(m_Ember->m_FinalRasH, m_GuiState.m_Strips,
[&](const string & s) { Output(QString::fromStdString(s)); }, //Greater than height.
[&](const string & s) { Output(QString::fromStdString(s)); }, //Mod height != 0.
[&](const string & s) { Output(QString::fromStdString(s) + "\n"); }); //Final strips value to be set.
ResetProgress();
if (!isBump)
{
//Save backup Xml.
if (doAll)
m_XmlWriter.Save(backup.toStdString().c_str(), m_EmberFile.m_Embers, 0, true, false, true, false, false);
else
m_XmlWriter.Save(backup.toStdString().c_str(), *m_Ember, 0, true, false, true, false, false);
SyncGuiToRenderer();
FirstOrDefaultRenderer()->m_ProgressParameter = reinterpret_cast<void*>(&currentStripForProgress);//When animating, only the first (primary) device has a progress parameter.
m_GuiState.m_Strips = VerifyStrips(m_Ember->m_FinalRasH, m_GuiState.m_Strips,
[&](const string & s) { Output(QString::fromStdString(s)); }, //Greater than height.
[&](const string & s) { Output(QString::fromStdString(s)); }, //Mod height != 0.
[&](const string & s) { Output(QString::fromStdString(s) + "\n"); }); //Final strips value to be set.
}
//The rendering process is different between doing a single image, and doing multiple.
if (doAll)
{
@ -291,7 +295,6 @@ FinalRenderEmberController<T>::FinalRenderEmberController(FractoriumFinalRenderD
}
else if (m_Renderer.get())//Render a single image.
{
bool isBump = m_IsQualityBump && m_GuiState.m_Strips == 1;//Should never get called with m_IsQualityBump otherwise, but check one last time to be safe.
m_ImageCount = 1;
m_Ember->m_TemporalSamples = 1;
m_Renderer->SetEmber(*m_Ember, isBump ? eProcessAction::KEEP_ITERATING : eProcessAction::FULL_RENDER);