--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

@ -6,7 +6,7 @@
<ProductVersion>3.7</ProductVersion> <ProductVersion>3.7</ProductVersion>
<ProjectGuid>{c8096c47-e358-438c-a520-146d46b0637d}</ProjectGuid> <ProjectGuid>{c8096c47-e358-438c-a520-146d46b0637d}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<OutputName>Fractorium_1.0.0.17</OutputName> <OutputName>Fractorium_1.0.0.18</OutputName>
<OutputType>Package</OutputType> <OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath> <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath> <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductVersion="1.0.0.17" ?> <?define ProductVersion="1.0.0.18" ?>
<?define ProductName="Fractorium $(var.ProductVersion) ($(var.GpuType))" ?> <?define ProductName="Fractorium $(var.ProductVersion) ($(var.GpuType))" ?>
<?define UpgradeCode="{4714cd15-bfba-44f6-8059-9e1466ebfa6e}"?> <?define UpgradeCode="{4714cd15-bfba-44f6-8059-9e1466ebfa6e}"?>
<?define Manufacturer="Fractorium"?> <?define Manufacturer="Fractorium"?>
@ -13,7 +13,7 @@
<!-- <!--
Change this for every release. Change this for every release.
--> -->
<?define ProductCode="{BDDB562B-DEF8-4F28-A1A5-171C048E0B7C}"?> <?define ProductCode="{B0ECFACF-9166-4AE2-A1BF-FF0C8D87FFDF}"?>
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)"> <Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package <Package

Binary file not shown.

View File

@ -49,8 +49,8 @@
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 0, 0, 17 FILEVERSION 1, 0, 0, 18
PRODUCTVERSION 1, 0, 0, 17 PRODUCTVERSION 1, 0, 0, 18
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -67,12 +67,12 @@
BEGIN BEGIN
VALUE "CompanyName", "Open Source" VALUE "CompanyName", "Open Source"
VALUE "FileDescription", "Renders fractal flames as animations with motion blur" VALUE "FileDescription", "Renders fractal flames as animations with motion blur"
VALUE "FileVersion", "1, 0, 0, 17" VALUE "FileVersion", "1, 0, 0, 18"
VALUE "InternalName", "EmberAnimate.exe" VALUE "InternalName", "EmberAnimate.exe"
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2019, GPL v3" VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2019, GPL v3"
VALUE "OriginalFilename", "EmberAnimate.exe" VALUE "OriginalFilename", "EmberAnimate.exe"
VALUE "ProductName", "Ember Animate" VALUE "ProductName", "Ember Animate"
VALUE "ProductVersion", "1, 0, 0, 17" VALUE "ProductVersion", "1, 0, 0, 18"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

Binary file not shown.

View File

@ -49,8 +49,8 @@
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 0, 0, 17 FILEVERSION 1, 0, 0, 18
PRODUCTVERSION 1, 0, 0, 17 PRODUCTVERSION 1, 0, 0, 18
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -67,12 +67,12 @@
BEGIN BEGIN
VALUE "CompanyName", "Open Source" VALUE "CompanyName", "Open Source"
VALUE "FileDescription", "Manipulates fractal flames parameter files" VALUE "FileDescription", "Manipulates fractal flames parameter files"
VALUE "FileVersion", "1, 0, 0, 17" VALUE "FileVersion", "1, 0, 0, 18"
VALUE "InternalName", "EmberGenome.exe" VALUE "InternalName", "EmberGenome.exe"
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2019, GPL v3" VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2019, GPL v3"
VALUE "OriginalFilename", "EmberGenome.exe" VALUE "OriginalFilename", "EmberGenome.exe"
VALUE "ProductName", "Ember Genome" VALUE "ProductName", "Ember Genome"
VALUE "ProductVersion", "1, 0, 0, 17" VALUE "ProductVersion", "1, 0, 0, 18"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -49,8 +49,8 @@
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 0, 0, 17 FILEVERSION 1, 0, 0, 18
PRODUCTVERSION 1, 0, 0, 17 PRODUCTVERSION 1, 0, 0, 18
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -67,12 +67,12 @@
BEGIN BEGIN
VALUE "CompanyName", "Open Source" VALUE "CompanyName", "Open Source"
VALUE "FileDescription", "Renders fractal flames as single images" VALUE "FileDescription", "Renders fractal flames as single images"
VALUE "FileVersion", "1, 0, 0, 17" VALUE "FileVersion", "1, 0, 0, 18"
VALUE "InternalName", "EmberRender.exe" VALUE "InternalName", "EmberRender.exe"
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2019, GPL v3" VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2019, GPL v3"
VALUE "OriginalFilename", "EmberRender.exe" VALUE "OriginalFilename", "EmberRender.exe"
VALUE "ProductName", "Ember Render" VALUE "ProductName", "Ember Render"
VALUE "ProductVersion", "1, 0, 0, 17" VALUE "ProductVersion", "1, 0, 0, 18"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

Binary file not shown.

View File

@ -1,4 +1,4 @@
VERSION = 1.0.0.17 VERSION = 1.0.0.18
win32:CONFIG += skip_target_version_ext win32:CONFIG += skip_target_version_ext
CONFIG += c++14 CONFIG += c++14

View File

@ -2,7 +2,7 @@
%define buildroot %{_topdir}/BUILDROOT %define buildroot %{_topdir}/BUILDROOT
Name: Fractorium Name: Fractorium
Version: 1.0.0.17 Version: 1.0.0.18
Release: 1 Release: 1
Summary: A fractal flame editor with GPU support Summary: A fractal flame editor with GPU support

View File

@ -8,7 +8,7 @@ Homepage: http://fractorium.com/
Vcs-Git: https://bitbucket.org/mfeemster/fractorium Vcs-Git: https://bitbucket.org/mfeemster/fractorium
Vcs-Browser: https://bitbucket.org/mfeemster/fractorium Vcs-Browser: https://bitbucket.org/mfeemster/fractorium
Package: Fractorium Package: Fractorium
Version: 1.0.0.17 Version: 1.0.0.18
Architecture: amd64 Architecture: amd64
Description: A fractal flame editor with GPU support Description: A fractal flame editor with GPU support
Fractorium Fractorium

View File

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

View File

@ -43,7 +43,7 @@ void RendererBase::ChangeVal(std::function<void(void)> func, eProcessAction acti
//new and old quality values. //new and old quality values.
else if (action == eProcessAction::KEEP_ITERATING) else if (action == eProcessAction::KEEP_ITERATING)
{ {
if (m_ProcessState == eProcessState::ACCUM_DONE && TemporalSamples() == 1) if ((m_ProcessState == eProcessState::ACCUM_DONE || m_ProcessState == eProcessState::ITER_STARTED) && TemporalSamples() == 1)
{ {
m_ProcessState = eProcessState::ITER_STARTED; m_ProcessState = eProcessState::ITER_STARTED;
m_ProcessAction = eProcessAction::KEEP_ITERATING; m_ProcessAction = eProcessAction::KEEP_ITERATING;

View File

@ -1349,8 +1349,8 @@ public:
T m_TransX, m_TransY, m_TransZ;//Translated point gotten by applying the affine transform to the input point gotten from the output of the previous iteration (excluding final). T m_TransX, m_TransY, m_TransZ;//Translated point gotten by applying the affine transform to the input point gotten from the output of the previous iteration (excluding final).
T m_PrecalcSumSquares;//Precalculated value of the sum of the squares of the translated point. T m_PrecalcSumSquares;//Precalculated value of the sum of the squares of the translated point.
T m_PrecalcSqrtSumSquares;//Precalculated value of the square root of m_PrecalcSumSquares. T m_PrecalcSqrtSumSquares;//Precalculated value of the square root of m_PrecalcSumSquares.
T m_PrecalcSina;//Precalculated value of m_TransX / m_PrecalcSqrtSumSquares.
T m_PrecalcCosa;//Precalculated value of m_TransY / m_PrecalcSqrtSumSquares. T m_PrecalcCosa;//Precalculated value of m_TransY / m_PrecalcSqrtSumSquares.
T m_PrecalcSina;//Precalculated value of m_TransX / m_PrecalcSqrtSumSquares.
T m_PrecalcAtanxy;//Precalculated value of atan2(m_TransX, m_TransY). T m_PrecalcAtanxy;//Precalculated value of atan2(m_TransX, m_TransY).
T m_PrecalcAtanyx;//Precalculated value of atan2(m_TransY, m_TransX). T m_PrecalcAtanyx;//Precalculated value of atan2(m_TransY, m_TransX).
v4T In, Out; v4T In, Out;
@ -1489,8 +1489,8 @@ public:
if (m_NeedPrecalcAngles) if (m_NeedPrecalcAngles)
{ {
iteratorHelper.m_PrecalcSina = iteratorHelper.In.x / iteratorHelper.m_PrecalcSqrtSumSquares; iteratorHelper.m_PrecalcSina = iteratorHelper.In.y / Zeps(iteratorHelper.m_PrecalcSqrtSumSquares);
iteratorHelper.m_PrecalcCosa = iteratorHelper.In.y / iteratorHelper.m_PrecalcSqrtSumSquares; iteratorHelper.m_PrecalcCosa = iteratorHelper.In.x / Zeps(iteratorHelper.m_PrecalcSqrtSumSquares);
} }
} }
} }
@ -1520,8 +1520,8 @@ public:
if (m_NeedPrecalcAngles) if (m_NeedPrecalcAngles)
{ {
ss << "\tprecalcSina = vIn.x / precalcSqrtSumSquares;\n"; ss << "\tprecalcSina = vIn.y / Zeps(precalcSqrtSumSquares);\n";
ss << "\tprecalcCosa = vIn.y / precalcSqrtSumSquares;\n"; ss << "\tprecalcCosa = vIn.x / Zeps(precalcSqrtSumSquares);\n";
} }
} }
} }

View File

@ -564,8 +564,8 @@ public:
{ {
T r = Zeps(helper.m_PrecalcSqrtSumSquares); T r = Zeps(helper.m_PrecalcSqrtSumSquares);
T r1 = m_Weight / r; T r1 = m_Weight / r;
helper.Out.x = r1 * (helper.m_PrecalcCosa + std::sin(r)); helper.Out.x = r1 * (helper.m_PrecalcSina + std::sin(r));//Intentionally flipped.
helper.Out.y = r1 * (helper.m_PrecalcSina - std::cos(r)); helper.Out.y = r1 * (helper.m_PrecalcCosa - std::cos(r));
helper.Out.z = m_Weight * helper.In.z; helper.Out.z = m_Weight * helper.In.z;
} }
@ -578,8 +578,8 @@ public:
<< "\t\treal_t r = Zeps(precalcSqrtSumSquares);\n" << "\t\treal_t r = Zeps(precalcSqrtSumSquares);\n"
<< "\t\treal_t r1 = " << weight << " / r;\n" << "\t\treal_t r1 = " << weight << " / r;\n"
<< "\n" << "\n"
<< "\t\tvOut.x = r1 * (precalcCosa + sin(r));\n" << "\t\tvOut.x = r1 * (precalcSina + sin(r));\n"
<< "\t\tvOut.y = r1 * (precalcSina - cos(r));\n" << "\t\tvOut.y = r1 * (precalcCosa - cos(r));\n"
<< "\t\tvOut.z = " << weight << " * vIn.z;\n" << "\t\tvOut.z = " << weight << " * vIn.z;\n"
<< "\t}\n"; << "\t}\n";
return ss.str(); return ss.str();
@ -609,8 +609,8 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{ {
T r = Zeps(helper.m_PrecalcSqrtSumSquares); T r = Zeps(helper.m_PrecalcSqrtSumSquares);
helper.Out.x = m_Weight * helper.m_PrecalcSina / r; helper.Out.x = m_Weight * helper.m_PrecalcCosa / r;//Flipped from flam3 because flam3 had them erroneously flipped.
helper.Out.y = m_Weight * helper.m_PrecalcCosa * r; helper.Out.y = m_Weight * helper.m_PrecalcSina * r;
helper.Out.z = m_Weight * helper.In.z; helper.Out.z = m_Weight * helper.In.z;
} }
@ -622,8 +622,8 @@ public:
ss << "\t{\n" ss << "\t{\n"
<< "\t\treal_t r = Zeps(precalcSqrtSumSquares);\n" << "\t\treal_t r = Zeps(precalcSqrtSumSquares);\n"
<< "\n" << "\n"
<< "\t\tvOut.x = " << weight << " * precalcSina / r;\n" << "\t\tvOut.x = " << weight << " * precalcCosa / r;\n"
<< "\t\tvOut.y = " << weight << " * precalcCosa * r;\n" << "\t\tvOut.y = " << weight << " * precalcSina * r;\n"
<< "\t\tvOut.z = " << weight << " * vIn.z;\n" << "\t\tvOut.z = " << weight << " * vIn.z;\n"
<< "\t}\n"; << "\t}\n";
return ss.str(); return ss.str();
@ -652,8 +652,8 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{ {
helper.Out.x = m_Weight * helper.m_PrecalcSina * std::cos(helper.m_PrecalcSqrtSumSquares); helper.Out.x = m_Weight * helper.m_PrecalcCosa * std::cos(helper.m_PrecalcSqrtSumSquares);//Flipped from flam3 because flam3 had them erroneously flipped.
helper.Out.y = m_Weight * helper.m_PrecalcCosa * std::sin(helper.m_PrecalcSqrtSumSquares); helper.Out.y = m_Weight * helper.m_PrecalcSina * std::sin(helper.m_PrecalcSqrtSumSquares);
helper.Out.z = DefaultZ(helper); helper.Out.z = DefaultZ(helper);
} }
@ -663,8 +663,8 @@ public:
string weight = WeightDefineString(); string weight = WeightDefineString();
intmax_t varIndex = IndexInXform(); intmax_t varIndex = IndexInXform();
ss << "\t{\n" ss << "\t{\n"
<< "\t\tvOut.x = " << weight << " * precalcSina * cos(precalcSqrtSumSquares);\n" << "\t\tvOut.x = " << weight << " * precalcCosa * cos(precalcSqrtSumSquares);\n"
<< "\t\tvOut.y = " << weight << " * precalcCosa * sin(precalcSqrtSumSquares);\n" << "\t\tvOut.y = " << weight << " * precalcSina * sin(precalcSqrtSumSquares);\n"
<< "\t\tvOut.z = " << DefaultZCl() << "\t\tvOut.z = " << DefaultZCl()
<< "\t}\n"; << "\t}\n";
return ss.str(); return ss.str();
@ -1050,9 +1050,9 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{ {
T r = m_Weight * std::pow(helper.m_PrecalcSqrtSumSquares, helper.m_PrecalcSina); T r = m_Weight * std::pow(helper.m_PrecalcSqrtSumSquares, helper.m_PrecalcCosa);//Flipped from flam3.
helper.Out.x = r * helper.m_PrecalcCosa; helper.Out.x = r * helper.m_PrecalcSina;//Intentionally flipped.
helper.Out.y = r * helper.m_PrecalcSina; helper.Out.y = r * helper.m_PrecalcCosa;
helper.Out.z = DefaultZ(helper); helper.Out.z = DefaultZ(helper);
} }
@ -1062,10 +1062,10 @@ public:
string weight = WeightDefineString(); string weight = WeightDefineString();
intmax_t varIndex = IndexInXform(); intmax_t varIndex = IndexInXform();
ss << "\t{\n" ss << "\t{\n"
<< "\t\treal_t r = " << weight << " * pow(precalcSqrtSumSquares, precalcSina);\n" << "\t\treal_t r = " << weight << " * pow(precalcSqrtSumSquares, precalcCosa);\n"
<< "\n" << "\n"
<< "\t\tvOut.x = r * precalcCosa;\n" << "\t\tvOut.x = r * precalcSina;\n"
<< "\t\tvOut.y = r * precalcSina;\n" << "\t\tvOut.y = r * precalcCosa;\n"
<< "\t\tvOut.z = " << DefaultZCl() << "\t\tvOut.z = " << DefaultZCl()
<< "\t}\n"; << "\t}\n";
return ss.str(); return ss.str();
@ -1140,8 +1140,8 @@ public:
T dx = Zeps(m_Xform->m_Affine.C() * m_Xform->m_Affine.C()); T dx = Zeps(m_Xform->m_Affine.C() * m_Xform->m_Affine.C());
T r = helper.m_PrecalcSqrtSumSquares; T r = helper.m_PrecalcSqrtSumSquares;
r = m_Weight * (fmod(r + dx, 2 * dx) - dx + r * (1 - dx)); r = m_Weight * (fmod(r + dx, 2 * dx) - dx + r * (1 - dx));
helper.Out.x = r * helper.m_PrecalcCosa; helper.Out.x = r * helper.m_PrecalcSina;//Intentionally flipped, also flipped from flam3 because flam3 had them erroneously flipped.
helper.Out.y = r * helper.m_PrecalcSina; helper.Out.y = r * helper.m_PrecalcCosa;
helper.Out.z = DefaultZ(helper); helper.Out.z = DefaultZ(helper);
} }
@ -1155,8 +1155,8 @@ public:
<< "\t\treal_t r = precalcSqrtSumSquares;\n" << "\t\treal_t r = precalcSqrtSumSquares;\n"
<< "\n" << "\n"
<< "\t\tr = " << weight << " * (fmod(r + dx, 2 * dx) + fma(r, ((real_t)(1.0) - dx), -dx));\n" << "\t\tr = " << weight << " * (fmod(r + dx, 2 * dx) + fma(r, ((real_t)(1.0) - dx), -dx));\n"
<< "\t\tvOut.x = r * precalcCosa;\n" << "\t\tvOut.x = r * precalcSina;\n"
<< "\t\tvOut.y = r * precalcSina;\n" << "\t\tvOut.y = r * precalcCosa;\n"
<< "\t\tvOut.z = " << DefaultZCl() << "\t\tvOut.z = " << DefaultZCl()
<< "\t}\n"; << "\t}\n";
return ss.str(); return ss.str();
@ -1253,8 +1253,8 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{ {
T r = helper.m_PrecalcSqrtSumSquares * (m_BlobLow + m_BlobDiff * (T(0.5) + T(0.5) * std::sin(m_BlobWaves * helper.m_PrecalcAtanxy))); T r = helper.m_PrecalcSqrtSumSquares * (m_BlobLow + m_BlobDiff * (T(0.5) + T(0.5) * std::sin(m_BlobWaves * helper.m_PrecalcAtanxy)));
helper.Out.x = m_Weight * helper.m_PrecalcSina * r; helper.Out.x = m_Weight * helper.m_PrecalcCosa * r;//Flipped from flam3 because flam3 had them erroneously flipped.
helper.Out.y = m_Weight * helper.m_PrecalcCosa * r; helper.Out.y = m_Weight * helper.m_PrecalcSina * r;
helper.Out.z = DefaultZ(helper); helper.Out.z = DefaultZ(helper);
} }
@ -1272,8 +1272,8 @@ public:
ss << "\t{\n" ss << "\t{\n"
<< "\t\treal_t r = precalcSqrtSumSquares * fma(" << blobDiff << ", fma((real_t)(0.5), sin(" << blobWaves << " * precalcAtanxy), (real_t)(0.5)), " << blobLow << ");\n" << "\t\treal_t r = precalcSqrtSumSquares * fma(" << blobDiff << ", fma((real_t)(0.5), sin(" << blobWaves << " * precalcAtanxy), (real_t)(0.5)), " << blobLow << ");\n"
<< "\n" << "\n"
<< "\t\tvOut.x = " << weight << " * precalcSina * r;\n" << "\t\tvOut.x = " << weight << " * precalcCosa * r;\n"
<< "\t\tvOut.y = " << weight << " * precalcCosa * r;\n" << "\t\tvOut.y = " << weight << " * precalcSina * r;\n"
<< "\t\tvOut.z = " << DefaultZCl() << "\t\tvOut.z = " << DefaultZCl()
<< "\t}\n"; << "\t}\n";
return ss.str(); return ss.str();
@ -1523,8 +1523,8 @@ public:
{ {
T r = helper.m_PrecalcSqrtSumSquares; T r = helper.m_PrecalcSqrtSumSquares;
r += -2 * m_Rings2Val2 * int((r + m_Rings2Val2) / (2 * m_Rings2Val2)) + r * (1 - m_Rings2Val2); r += -2 * m_Rings2Val2 * int((r + m_Rings2Val2) / (2 * m_Rings2Val2)) + r * (1 - m_Rings2Val2);
helper.Out.x = m_Weight * helper.m_PrecalcSina * r; helper.Out.x = m_Weight * helper.m_PrecalcCosa * r;//Flipped from flam3 because flam3 had them erroneously flipped.
helper.Out.y = m_Weight * helper.m_PrecalcCosa * r; helper.Out.y = m_Weight * helper.m_PrecalcSina * r;
helper.Out.z = m_Weight * helper.In.z; helper.Out.z = m_Weight * helper.In.z;
} }
@ -1542,8 +1542,8 @@ public:
<< "\n" << "\n"
<< "\t\tr += fma((real_t)(-2.0) * " << rings2Val2 << ", (real_t)(int)((r + " << rings2Val2 << ") / ((real_t)(2.0) * " << rings2Val2 << ")), r * ((real_t)(1.0) - " << rings2Val2 << "));\n" << "\t\tr += fma((real_t)(-2.0) * " << rings2Val2 << ", (real_t)(int)((r + " << rings2Val2 << ") / ((real_t)(2.0) * " << rings2Val2 << ")), r * ((real_t)(1.0) - " << rings2Val2 << "));\n"
//<< "\t\tr += -(real_t)(2.0) * " << rings2Val2 << " * (int)((r + " << rings2Val2 << ") / ((real_t)(2.0) * " << rings2Val2 << ")) + r * ((real_t)(1.0) - " << rings2Val2 << ");\n" //<< "\t\tr += -(real_t)(2.0) * " << rings2Val2 << " * (int)((r + " << rings2Val2 << ") / ((real_t)(2.0) * " << rings2Val2 << ")) + r * ((real_t)(1.0) - " << rings2Val2 << ");\n"
<< "\t\tvOut.x = (" << weight << " * precalcSina * r);\n" << "\t\tvOut.x = (" << weight << " * precalcCosa * r);\n"
<< "\t\tvOut.y = (" << weight << " * precalcCosa * r);\n" << "\t\tvOut.y = (" << weight << " * precalcSina * r);\n"
<< "\t\tvOut.z = " << weight << " * vIn.z;\n" << "\t\tvOut.z = " << weight << " * vIn.z;\n"
<< "\t}\n"; << "\t}\n";
return ss.str(); return ss.str();

View File

@ -56,12 +56,12 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{ {
T theta = helper.m_PrecalcAtanyx; T theta = helper.m_PrecalcAtanyx;
T t = (rand.Frand01<T>() * m_Thickness) * (1 / std::cos(m_N * theta)) - m_Holes; T t = (!m_ThicknessWeight ? m_Weight : m_ThicknessWeight * rand.Frand01<T>()) / std::cos(m_N * theta) - m_HolesWeight;
if (std::abs(t) != 0) if (std::abs(t) != 0)
{ {
helper.Out.x = m_Weight * t * std::cos(theta); helper.Out.x = t * std::cos(theta);
helper.Out.y = m_Weight * t * std::sin(theta); helper.Out.y = t * std::sin(theta);
} }
else else
{ {
@ -82,14 +82,16 @@ public:
string n = "parVars[" + ToUpper(m_Params[i++].Name()) + index; string n = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string thickness = "parVars[" + ToUpper(m_Params[i++].Name()) + index; string thickness = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string holes = "parVars[" + ToUpper(m_Params[i++].Name()) + index; string holes = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string thicknessweight = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string holesweight = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
ss << "\t{\n" ss << "\t{\n"
<< "\t\treal_t theta = precalcAtanyx;\n" << "\t\treal_t theta = precalcAtanyx;\n"
<< "\t\treal_t t = (MwcNext01(mwc) * " << thickness << ") * (1 / cos(" << n << " * theta)) - " << holes << ";\n" << "\t\treal_t t = (!" << thicknessweight << " ? " << weight << " : MwcNext01(mwc) * " << thicknessweight << ") / cos(" << n << " * theta) - " << holesweight << ";\n"
<< "\n" << "\n"
<< "\t\tif (fabs(t) != 0)\n" << "\t\tif (fabs(t) != 0)\n"
<< "\t\t{\n" << "\t\t{\n"
<< "\t\t\tvOut.x = " << weight << " * t * cos(theta);\n" << "\t\t\tvOut.x = t * cos(theta);\n"
<< "\t\t\tvOut.y = " << weight << " * t * sin(theta);\n" << "\t\t\tvOut.y = t * sin(theta);\n"
<< "\t\t}\n" << "\t\t}\n"
<< "\t\telse\n" << "\t\telse\n"
<< "\t\t{\n" << "\t\t{\n"
@ -101,6 +103,12 @@ public:
return ss.str(); return ss.str();
} }
virtual void Precalc() override
{
m_ThicknessWeight = m_Thickness * m_Weight;
m_HolesWeight = m_Holes * m_Weight;
}
protected: protected:
void Init() void Init()
{ {
@ -109,12 +117,16 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_N, prefix + "epispiral_n", 6)); m_Params.push_back(ParamWithName<T>(&m_N, prefix + "epispiral_n", 6));
m_Params.push_back(ParamWithName<T>(&m_Thickness, prefix + "epispiral_thickness")); m_Params.push_back(ParamWithName<T>(&m_Thickness, prefix + "epispiral_thickness"));
m_Params.push_back(ParamWithName<T>(&m_Holes, prefix + "epispiral_holes", 1)); m_Params.push_back(ParamWithName<T>(&m_Holes, prefix + "epispiral_holes", 1));
m_Params.push_back(ParamWithName<T>(true, &m_ThicknessWeight, prefix + "epispiral_thickness_weight")); //Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_HolesWeight, prefix + "epispiral_holes_weight"));
} }
private: private:
T m_N; T m_N;
T m_Thickness; T m_Thickness;
T m_Holes; T m_Holes;
T m_ThicknessWeight;//Precalc.
T m_HolesWeight;
}; };
/// <summary> /// <summary>
@ -4161,7 +4173,7 @@ template <typename T>
class OrthoVariation : public ParametricVariation<T> class OrthoVariation : public ParametricVariation<T>
{ {
public: public:
OrthoVariation(T weight = 1.0) : ParametricVariation<T>("ortho", eVariationId::VAR_ORTHO, weight, true, false, false, false, true) OrthoVariation(T weight = 1.0) : ParametricVariation<T>("ortho", eVariationId::VAR_ORTHO, weight, true, true, true, false, false)
{ {
Init(); Init();
} }
@ -4204,8 +4216,8 @@ public:
else else
{ {
r = 1 / std::sqrt(r); r = 1 / std::sqrt(r);
ts = std::sin(helper.m_PrecalcAtanyx); ts = helper.m_PrecalcSina;
tc = std::cos(helper.m_PrecalcAtanyx); tc = helper.m_PrecalcCosa;
x = r * tc; x = r * tc;
y = r * ts; y = r * ts;
@ -4296,8 +4308,8 @@ public:
<< "\t\telse\n" << "\t\telse\n"
<< "\t\t{\n" << "\t\t{\n"
<< "\t\t r = 1 / sqrt(r);\n" << "\t\t r = 1 / sqrt(r);\n"
<< "\t\t ts = sin(precalcAtanyx);\n" << "\t\t ts = precalcSina;\n"
<< "\t\t tc = cos(precalcAtanyx);\n" << "\t\t tc = precalcCosa;\n"
<< "\t\t x = r * tc;\n" << "\t\t x = r * tc;\n"
<< "\t\t y = r * ts;\n" << "\t\t y = r * ts;\n"
<< "\t\t real_t x2 = SQR(x);\n" << "\t\t real_t x2 = SQR(x);\n"

View File

@ -1390,7 +1390,7 @@ template <typename T>
class CropNVariation : public ParametricVariation<T> class CropNVariation : public ParametricVariation<T>
{ {
public: public:
CropNVariation(T weight = 1.0) : ParametricVariation<T>("cropn", eVariationId::VAR_CROPN, weight, true, true, false, false, true) CropNVariation(T weight = 1.0) : ParametricVariation<T>("cropn", eVariationId::VAR_CROPN, weight, true, true, true, false, true)
{ {
Init(); Init();
} }
@ -1413,8 +1413,8 @@ public:
else else
{ {
T rdc = xr + (rand.Frand01<T>() * T(0.5) * m_ScatterDist); T rdc = xr + (rand.Frand01<T>() * T(0.5) * m_ScatterDist);
helper.Out.x = m_Weight * rdc * std::cos(helper.m_PrecalcAtanyx); helper.Out.x = m_Weight * rdc * helper.m_PrecalcCosa;
helper.Out.y = m_Weight * rdc * std::sin(helper.m_PrecalcAtanyx); helper.Out.y = m_Weight * rdc * helper.m_PrecalcSina;
} }
} }
else else
@ -1457,8 +1457,8 @@ public:
<< "\t\t {\n" << "\t\t {\n"
<< "\t\t real_t rdc = fma(MwcNext01(mwc), (real_t)(0.5) * " << scatterDist << ", xr);\n" << "\t\t real_t rdc = fma(MwcNext01(mwc), (real_t)(0.5) * " << scatterDist << ", xr);\n"
<< "\n" << "\n"
<< "\t\t vOut.x = " << weight << " * rdc * cos(precalcAtanyx);\n" << "\t\t vOut.x = " << weight << " * rdc * precalcCosa;\n"
<< "\t\t vOut.y = " << weight << " * rdc * sin(precalcAtanyx);\n" << "\t\t vOut.y = " << weight << " * rdc * precalcSina;\n"
<< "\t\t }\n" << "\t\t }\n"
<< "\t\t}\n" << "\t\t}\n"
<< "\t\telse\n" << "\t\telse\n"
@ -1574,7 +1574,7 @@ template <typename T>
class Blob2Variation : public ParametricVariation<T> class Blob2Variation : public ParametricVariation<T>
{ {
public: public:
Blob2Variation(T weight = 1.0) : ParametricVariation<T>("blob2", eVariationId::VAR_BLOB2, weight, true, true, false, false, true) Blob2Variation(T weight = 1.0) : ParametricVariation<T>("blob2", eVariationId::VAR_BLOB2, weight, true, true, true, false, true)
{ {
Init(); Init();
} }
@ -1599,8 +1599,8 @@ public:
delta = std::exp(m_Prescale * std::log(delta * positive)) * m_Postscale * positive; delta = std::exp(m_Prescale * std::log(delta * positive)) * m_Postscale * positive;
T rad = m_Radius + (helper.m_PrecalcSqrtSumSquares - m_Radius) * delta; T rad = m_Radius + (helper.m_PrecalcSqrtSumSquares - m_Radius) * delta;
helper.Out.x = m_Weight * rad * std::cos(helper.m_PrecalcAtanyx); helper.Out.x = m_Weight * rad * helper.m_PrecalcCosa;
helper.Out.y = m_Weight * rad * std::sin(helper.m_PrecalcAtanyx); helper.Out.y = m_Weight * rad * helper.m_PrecalcSina;
helper.Out.z = m_Weight * helper.In.z; helper.Out.z = m_Weight * helper.In.z;
//helper.m_TransZ += m_Weight * outPoint.m_Z;//Original had this which is probably wrong. //helper.m_TransZ += m_Weight * outPoint.m_Z;//Original had this which is probably wrong.
} }
@ -1639,8 +1639,8 @@ public:
<< "\n" << "\n"
<< "\t\t real_t rad = fma(precalcSqrtSumSquares - " << radius << ", delta, " << radius << ");\n" << "\t\t real_t rad = fma(precalcSqrtSumSquares - " << radius << ", delta, " << radius << ");\n"
<< "\n" << "\n"
<< "\t\t vOut.x = " << weight << " * rad * cos(precalcAtanyx);\n" << "\t\t vOut.x = " << weight << " * rad * precalcCosa;\n"
<< "\t\t vOut.y = " << weight << " * rad * sin(precalcAtanyx);\n" << "\t\t vOut.y = " << weight << " * rad * precalcSina;\n"
<< "\t\t vOut.z = " << weight << " * vIn.z;\n" << "\t\t vOut.z = " << weight << " * vIn.z;\n"
//<< "\t\t transZ += " << weight << " * outPoint->m_Z;\n"//Original had this which is probably wrong. //<< "\t\t transZ += " << weight << " * outPoint->m_Z;\n"//Original had this which is probably wrong.
<< "\t\t}\n" << "\t\t}\n"

View File

@ -2512,7 +2512,7 @@ template <typename T>
class FourthVariation : public ParametricVariation<T> class FourthVariation : public ParametricVariation<T>
{ {
public: public:
FourthVariation(T weight = 1.0) : ParametricVariation<T>("fourth", eVariationId::VAR_FOURTH, weight, true, true, false, false, true) FourthVariation(T weight = 1.0) : ParametricVariation<T>("fourth", eVariationId::VAR_FOURTH, weight, true, true, true, false, false)
{ {
Init(); Init();
} }
@ -2524,8 +2524,8 @@ public:
if (helper.In.x > 0 && helper.In.y > 0)//Quadrant IV: spherical. if (helper.In.x > 0 && helper.In.y > 0)//Quadrant IV: spherical.
{ {
T r = 1 / helper.m_PrecalcSqrtSumSquares; T r = 1 / helper.m_PrecalcSqrtSumSquares;
helper.Out.x = m_Weight * r * std::cos(helper.m_PrecalcAtanyx); helper.Out.x = m_Weight * r * helper.m_PrecalcCosa;
helper.Out.y = m_Weight * r * std::sin(helper.m_PrecalcAtanyx); helper.Out.y = m_Weight * r * helper.m_PrecalcSina;
} }
else if (helper.In.x > 0 && helper.In.y < 0)//Quadrant I: loonie. else if (helper.In.x > 0 && helper.In.y < 0)//Quadrant I: loonie.
{ {
@ -2590,8 +2590,8 @@ public:
<< "\t\t{\n" << "\t\t{\n"
<< "\t\t real_t r = 1 / precalcSqrtSumSquares;\n" << "\t\t real_t r = 1 / precalcSqrtSumSquares;\n"
<< "\n" << "\n"
<< "\t\t vOut.x = " << weight << " * r * cos(precalcAtanyx);\n" << "\t\t vOut.x = " << weight << " * r * precalcCosa;\n"
<< "\t\t vOut.y = " << weight << " * r * sin(precalcAtanyx);\n" << "\t\t vOut.y = " << weight << " * r * precalcSina;\n"
<< "\t\t}\n" << "\t\t}\n"
<< "\t\telse if (vIn.x > 0 && vIn.y < 0)\n" << "\t\telse if (vIn.x > 0 && vIn.y < 0)\n"
<< "\t\t{\n" << "\t\t{\n"
@ -2833,7 +2833,7 @@ template <typename T>
class SpherivoidVariation : public ParametricVariation<T> class SpherivoidVariation : public ParametricVariation<T>
{ {
public: public:
SpherivoidVariation(T weight = 1.0) : ParametricVariation<T>("spherivoid", eVariationId::VAR_SPHERIVOID, weight, true, true, false, false, true) SpherivoidVariation(T weight = 1.0) : ParametricVariation<T>("spherivoid", eVariationId::VAR_SPHERIVOID, weight, true, true, true, false, false)
{ {
Init(); Init();
} }
@ -2846,8 +2846,8 @@ public:
const T phi = std::acos(Clamp<T>(helper.In.z / zr, -1, 1)); const T phi = std::acos(Clamp<T>(helper.In.z / zr, -1, 1));
const T ps = std::sin(phi); const T ps = std::sin(phi);
const T pc = std::cos(phi); const T pc = std::cos(phi);
helper.Out.x = m_Weight * std::cos(helper.m_PrecalcAtanyx) * ps * (zr + m_Radius); helper.Out.x = m_Weight * helper.m_PrecalcCosa * ps * (zr + m_Radius);
helper.Out.y = m_Weight * std::sin(helper.m_PrecalcAtanyx) * ps * (zr + m_Radius); helper.Out.y = m_Weight * helper.m_PrecalcSina * ps * (zr + m_Radius);
helper.Out.z = m_Weight * pc * (zr + m_Radius); helper.Out.z = m_Weight * pc * (zr + m_Radius);
} }
@ -2865,8 +2865,8 @@ public:
<< "\t\tconst real_t ps = sin(phi);\n" << "\t\tconst real_t ps = sin(phi);\n"
<< "\t\tconst real_t pc = cos(phi);\n" << "\t\tconst real_t pc = cos(phi);\n"
<< "\n" << "\n"
<< "\t\tvOut.x = " << weight << " * cos(precalcAtanyx) * ps * (zr + " << radius << ");\n" << "\t\tvOut.x = " << weight << " * precalcCosa * ps * (zr + " << radius << ");\n"
<< "\t\tvOut.y = " << weight << " * sin(precalcAtanyx) * ps * (zr + " << radius << ");\n" << "\t\tvOut.y = " << weight << " * precalcSina * ps * (zr + " << radius << ");\n"
<< "\t\tvOut.z = " << weight << " * pc * (zr + " << radius << ");\n" << "\t\tvOut.z = " << weight << " * pc * (zr + " << radius << ");\n"
<< "\t}\n"; << "\t}\n";
return ss.str(); return ss.str();
@ -5407,8 +5407,8 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{ {
T r = helper.m_PrecalcSqrtSumSquares * (m_BlobLow + m_BlobDiff * (T(0.5) + T(0.5) * std::sin(m_BlobWaves * helper.m_PrecalcAtanxy))); T r = helper.m_PrecalcSqrtSumSquares * (m_BlobLow + m_BlobDiff * (T(0.5) + T(0.5) * std::sin(m_BlobWaves * helper.m_PrecalcAtanxy)));
helper.Out.x = m_Weight * helper.m_PrecalcSina * r; helper.Out.x = m_Weight * helper.m_PrecalcCosa * r;//Flipped from original JWildfire plugin which did atan2(x, y) then sin, cos.
helper.Out.y = m_Weight * helper.m_PrecalcCosa * r; helper.Out.y = m_Weight * helper.m_PrecalcSina * r;//Here we do atan(y, x) then cos, sin.
helper.Out.z = m_Weight * std::sin(m_BlobWaves * helper.m_PrecalcAtanxy) * r; helper.Out.z = m_Weight * std::sin(m_BlobWaves * helper.m_PrecalcAtanxy) * r;
} }
@ -5426,8 +5426,8 @@ public:
ss << "\t{\n" ss << "\t{\n"
<< "\t\treal_t r = precalcSqrtSumSquares * fma(" << blobDiff << ", fma((real_t)(0.5), sin(" << blobWaves << " * precalcAtanxy), (real_t)(0.5)), " << blobLow << ");\n" << "\t\treal_t r = precalcSqrtSumSquares * fma(" << blobDiff << ", fma((real_t)(0.5), sin(" << blobWaves << " * precalcAtanxy), (real_t)(0.5)), " << blobLow << ");\n"
<< "\n" << "\n"
<< "\t\tvOut.x = " << weight << " * (precalcSina * r);\n" << "\t\tvOut.x = " << weight << " * (precalcCosa * r);\n"
<< "\t\tvOut.y = " << weight << " * (precalcCosa * r);\n" << "\t\tvOut.y = " << weight << " * (precalcSina * r);\n"
<< "\t\tvOut.z = " << weight << " * (sin(" << blobWaves << " * precalcAtanxy) * r);\n" << "\t\tvOut.z = " << weight << " * (sin(" << blobWaves << " * precalcAtanxy) * r);\n"
<< "\t}\n"; << "\t}\n";
return ss.str(); return ss.str();

View File

@ -5446,7 +5446,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Roundstr, prefix + "smartshape_roundstr")); m_Params.push_back(ParamWithName<T>(&m_Roundstr, prefix + "smartshape_roundstr"));
m_Params.push_back(ParamWithName<T>(&m_Roundwidth, prefix + "smartshape_roundwidth", 1)); m_Params.push_back(ParamWithName<T>(&m_Roundwidth, prefix + "smartshape_roundwidth", 1));
m_Params.push_back(ParamWithName<T>(&m_Distortion, prefix + "smartshape_distortion", 1)); m_Params.push_back(ParamWithName<T>(&m_Distortion, prefix + "smartshape_distortion", 1));
m_Params.push_back(ParamWithName<T>(&m_Compensation, prefix + "smartshape_compensation", 1, eParamType::INTEGER, 0, 1)); m_Params.push_back(ParamWithName<T>(&m_Compensation, prefix + "smartshape_compensation", 0, eParamType::INTEGER, 0, 1));
m_Params.push_back(ParamWithName<T>(true, &m_Alpha, prefix + "smartshape_alpha"));//Precalc. m_Params.push_back(ParamWithName<T>(true, &m_Alpha, prefix + "smartshape_alpha"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_AlphaCoeff, prefix + "smartshape_alphacoeff")); m_Params.push_back(ParamWithName<T>(true, &m_AlphaCoeff, prefix + "smartshape_alphacoeff"));
m_Params.push_back(ParamWithName<T>(true, &m_RoundCoeff, prefix + "smartshape_roundcoeff")); m_Params.push_back(ParamWithName<T>(true, &m_RoundCoeff, prefix + "smartshape_roundcoeff"));

View File

@ -874,8 +874,8 @@ public:
if (m_NeedPrecalcAngles) if (m_NeedPrecalcAngles)
{ {
helper.m_PrecalcSina = helper.m_TransX / Zeps(helper.m_PrecalcSqrtSumSquares); helper.m_PrecalcCosa = helper.m_TransX / Zeps(helper.m_PrecalcSqrtSumSquares);
helper.m_PrecalcCosa = helper.m_TransY / Zeps(helper.m_PrecalcSqrtSumSquares); helper.m_PrecalcSina = helper.m_TransY / Zeps(helper.m_PrecalcSqrtSumSquares);
} }
} }
} }

View File

@ -235,6 +235,11 @@ XmlToEmber<T>::XmlToEmber()
{ "sshape_roundwidth", "smartshape_roundwidth" }, { "sshape_roundwidth", "smartshape_roundwidth" },
{ "sshape_distortion", "smartshape_distortion" }, { "sshape_distortion", "smartshape_distortion" },
{ "sshape_compensation", "smartshape_compensation" }, { "sshape_compensation", "smartshape_compensation" },
{ "post_sshape_power", "post_smartshape_power" },
{ "post_sshape_roundstr", "post_smartshape_roundstr" },
{ "post_sshape_roundwidth", "post_smartshape_roundwidth" },
{ "post_sshape_distortion", "post_smartshape_distortion" },
{ "post_sshape_compensation", "post_smartshape_compensation" },
{ "mult_x", "unicorngaloshen_mult_x" }, { "mult_x", "unicorngaloshen_mult_x" },
{ "mult_y", "unicorngaloshen_mult_y" }, { "mult_y", "unicorngaloshen_mult_y" },
{ "sine", "unicorngaloshen_sine" }, { "sine", "unicorngaloshen_sine" },
@ -347,6 +352,24 @@ XmlToEmber<T>::XmlToEmber()
}; };
m_BadVariationNames.push_back(make_pair(make_pair(string("post_scrop"), string("post_smartcrop")), badParams)); m_BadVariationNames.push_back(make_pair(make_pair(string("post_scrop"), string("post_smartcrop")), badParams));
badParams = badParams =
{
"sshape_power",
"sshape_roundstr",
"sshape_roundwidth",
"sshape_distortion",
"sshape_compensation"
};
m_BadVariationNames.push_back(make_pair(make_pair(string("sshape"), string("smartshape")), badParams));
badParams =
{
"post_sshape_power",
"post_sshape_roundstr",
"post_sshape_roundwidth",
"post_sshape_distortion",
"post_sshape_compensation"
};
m_BadVariationNames.push_back(make_pair(make_pair(string("post_sshape"), string("post_smartshape")), badParams));
badParams =
{ {
"radial_gaussian_angle" "radial_gaussian_angle"
}; };
@ -2168,9 +2191,9 @@ bool XmlToEmber<T>::ParseEmberElement(xmlNode* emberNode, Ember<T>& currentEmber
if (!fromEmber && !newLinear) if (!fromEmber && !newLinear)
currentEmber.Flatten(m_FlattenNames); currentEmber.Flatten(m_FlattenNames);
if (soloXform >= 0)
for (i = 0; i < currentEmber.XformCount(); i++) for (i = 0; i < currentEmber.XformCount(); i++)
if (soloXform >= 0 && i != soloXform) currentEmber.GetXform(i)->m_Opacity = T(i == soloXform);//Will calc the cached adjusted viz value later.
currentEmber.GetXform(i)->m_Opacity = 0;//Will calc the cached adjusted viz value later.
return true; return true;
} }

View File

@ -149,8 +149,8 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(const Ember<T>& ember,
if (xform->NeedPrecalcAngles()) if (xform->NeedPrecalcAngles())
{ {
xformFuncs << "\tprecalcSina = transX / Zeps(precalcSqrtSumSquares);\n"; xformFuncs << "\tprecalcCosa = transX / Zeps(precalcSqrtSumSquares);\n";
xformFuncs << "\tprecalcCosa = transY / Zeps(precalcSqrtSumSquares);\n"; xformFuncs << "\tprecalcSina = transY / Zeps(precalcSqrtSumSquares);\n";
} }
if (xform->NeedPrecalcAtanXY()) if (xform->NeedPrecalcAtanXY())

View File

@ -58,7 +58,7 @@
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="text"> <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>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::RichText</enum> <enum>Qt::RichText</enum>
@ -79,7 +79,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::NoTextInteraction</set>
</property> </property>
</widget> </widget>
<widget class="QWidget" name="verticalLayoutWidget"> <widget class="QWidget" name="verticalLayoutWidget">

View File

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

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
fractorium (1.0.0.18-0ubuntu1) bionic; urgency=low
* release 1.0.0.18
-- Matt Feemster <matt.feemster@gmail.com> Wed, 25 Dec 2019 20:20:20 -0700
fractorium (1.0.0.17a-0ubuntu1) bionic; urgency=low fractorium (1.0.0.17a-0ubuntu1) bionic; urgency=low
* release 1.0.0.17 * release 1.0.0.17