mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 13:10:04 -05:00
06/04/2017
--User changes -Make all fonts be MS Shell Dlg 2. This will require reloading dark.qss if users are already using it. -Limit size of the left side of the palette editor. -Disable create from image buttons in the palette editor when working on a fixed palette. --Bug fixes -The following variations were wrong: coshq, cothq. -During iteration, the color index could become nan if all xform color speeds were negative. This could lead to bad results on the GPU. Fix to check for nan. Minimal speed difference. --Code changes -Make the following variations safer by using Zeps(): sinq, sinhq, secq, sechq, tanq, tanhq, cosq, coshq, cotq, cothq, cscq, cschq, estiq. -Always pass -cl-no-signed-zeros -cl-denorms-are-zero to kernel compiles for both single and double. -Flush all denormals to zero for all executable programs. This will likely lead to a speedup for badly behaving programs.
This commit is contained in:
parent
5a8b4b1148
commit
66a597df39
@ -87,7 +87,7 @@ QDoubleSpinBox
|
||||
padding-right: 0px;
|
||||
color: darkgray;
|
||||
selection-background-color: darkgray;
|
||||
font: 9pt "Segoe UI";/*For some reason the font changes if you set any style. Set this to whatever font is the default on your system*/
|
||||
font: 8pt "MS Shell Dlg 2";/*For some reason the font changes if you set any style. Set this to whatever font is the default on your system*/
|
||||
}
|
||||
|
||||
QCheckBox
|
||||
|
@ -3126,7 +3126,7 @@ public:
|
||||
T c = std::cos(helper.In.x);
|
||||
T sh = std::sinh(absV);
|
||||
T ch = std::cosh(absV);
|
||||
T d = m_Weight * c * sh / absV;
|
||||
T d = m_Weight * c * sh / Zeps(absV);
|
||||
helper.Out.x = m_Weight * s * ch;
|
||||
helper.Out.y = d * helper.In.y;
|
||||
helper.Out.z = d * helper.In.z;
|
||||
@ -3142,7 +3142,7 @@ public:
|
||||
<< "\t\treal_t c = cos(vIn.x);\n"
|
||||
<< "\t\treal_t sh = sinh(absV);\n"
|
||||
<< "\t\treal_t ch = cosh(absV);\n"
|
||||
<< "\t\treal_t d = xform->m_VariationWeights[" << varIndex << "] * c * sh / absV;\n"
|
||||
<< "\t\treal_t d = xform->m_VariationWeights[" << varIndex << "] * c * sh / Zeps(absV);\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * s * ch;\n"
|
||||
<< "\t\tvOut.y = d * vIn.y;\n"
|
||||
@ -3153,7 +3153,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Hypot" };
|
||||
return vector<string> { "Hypot", "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
@ -3175,7 +3175,7 @@ public:
|
||||
T c = std::cos(absV);
|
||||
T sh = std::sinh(helper.In.x);
|
||||
T ch = std::cosh(helper.In.x);
|
||||
T d = m_Weight * ch * s / absV;
|
||||
T d = m_Weight * ch * s / Zeps(absV);
|
||||
helper.Out.x = m_Weight * sh * c;
|
||||
helper.Out.y = d * helper.In.y;
|
||||
helper.Out.z = d * helper.In.z;
|
||||
@ -3191,7 +3191,7 @@ public:
|
||||
<< "\t\treal_t c = cos(absV);\n"
|
||||
<< "\t\treal_t sh = sinh(vIn.x);\n"
|
||||
<< "\t\treal_t ch = cosh(vIn.x);\n"
|
||||
<< "\t\treal_t d = xform->m_VariationWeights[" << varIndex << "] * ch * s / absV;\n"
|
||||
<< "\t\treal_t d = xform->m_VariationWeights[" << varIndex << "] * ch * s / Zeps(absV);\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * sh * c;\n"
|
||||
<< "\t\tvOut.y = d * vIn.y;\n"
|
||||
@ -3202,7 +3202,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Hypot" };
|
||||
return vector<string> { "Hypot", "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
@ -3220,12 +3220,12 @@ public:
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T absV = VarFuncs<T>::Hypot(helper.In.y, helper.In.z);
|
||||
T ni = m_Weight / (helper.m_PrecalcSumSquares + SQR(helper.In.z));
|
||||
T ni = m_Weight / Zeps(helper.m_PrecalcSumSquares + SQR(helper.In.z));
|
||||
T s = std::sin(-helper.In.x);
|
||||
T c = std::cos(-helper.In.x);
|
||||
T sh = std::sinh(absV);
|
||||
T ch = std::cosh(absV);
|
||||
T d = ni * s * sh / absV;
|
||||
T d = ni * s * sh / Zeps(absV);
|
||||
helper.Out.x = c * ch * ni;
|
||||
helper.Out.y = -(d * helper.In.y);
|
||||
helper.Out.z = -(d * helper.In.z);
|
||||
@ -3237,12 +3237,12 @@ public:
|
||||
intmax_t varIndex = IndexInXform();
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t absV = Hypot(vIn.y, vIn.z);\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / (precalcSumSquares + SQR(vIn.z));\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / Zeps(precalcSumSquares + SQR(vIn.z));\n"
|
||||
<< "\t\treal_t s = sin(-vIn.x);\n"
|
||||
<< "\t\treal_t c = cos(-vIn.x);\n"
|
||||
<< "\t\treal_t sh = sinh(absV);\n"
|
||||
<< "\t\treal_t ch = cosh(absV);\n"
|
||||
<< "\t\treal_t d = ni * s * sh / absV;\n"
|
||||
<< "\t\treal_t d = ni * s * sh / Zeps(absV);\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = c * ch * ni;\n"
|
||||
<< "\t\tvOut.y = -(d * vIn.y);\n"
|
||||
@ -3253,7 +3253,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Hypot" };
|
||||
return vector<string> { "Hypot", "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
@ -3271,12 +3271,12 @@ public:
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T absV = VarFuncs<T>::Hypot(helper.In.y, helper.In.z);
|
||||
T ni = m_Weight / (helper.m_PrecalcSumSquares + SQR(helper.In.z));
|
||||
T ni = m_Weight / Zeps(helper.m_PrecalcSumSquares + SQR(helper.In.z));
|
||||
T s = std::sin(absV);
|
||||
T c = std::cos(absV);
|
||||
T sh = std::sinh(helper.In.x);
|
||||
T ch = std::cosh(helper.In.x);
|
||||
T d = ni * sh * s / absV;
|
||||
T d = ni * sh * s / Zeps(absV);
|
||||
helper.Out.x = ch * c * ni;
|
||||
helper.Out.y = -(d * helper.In.y);
|
||||
helper.Out.z = -(d * helper.In.z);
|
||||
@ -3288,7 +3288,7 @@ public:
|
||||
intmax_t varIndex = IndexInXform();
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t absV = Hypot(vIn.y, vIn.z);\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / (precalcSumSquares + SQR(vIn.z));\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / Zeps(precalcSumSquares + SQR(vIn.z));\n"
|
||||
<< "\t\treal_t s = sin(absV);\n"
|
||||
<< "\t\treal_t c = cos(absV);\n"
|
||||
<< "\t\treal_t sh = sinh(vIn.x);\n"
|
||||
@ -3304,7 +3304,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Hypot" };
|
||||
return vector<string> { "Hypot", "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
@ -3323,13 +3323,13 @@ public:
|
||||
{
|
||||
T sysz = SQR(helper.In.y) + SQR(helper.In.z);
|
||||
T absV = std::sqrt(sysz);
|
||||
T ni = m_Weight / (SQR(helper.In.x) + sysz);
|
||||
T ni = m_Weight / Zeps(SQR(helper.In.x) + sysz);
|
||||
T s = std::sin(helper.In.x);
|
||||
T c = std::cos(helper.In.x);
|
||||
T sh = std::sinh(absV);
|
||||
T ch = std::cosh(absV);
|
||||
T d = c * sh / absV;
|
||||
T b = -s * sh / absV;
|
||||
T d = c * sh / Zeps(absV);
|
||||
T b = -s * sh / Zeps(absV);
|
||||
T stcv = s * ch;
|
||||
T nstcv = -stcv;
|
||||
T ctcv = c * ch;
|
||||
@ -3345,13 +3345,13 @@ public:
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t sysz = SQR(vIn.y) + SQR(vIn.z);\n"
|
||||
<< "\t\treal_t absV = sqrt(sysz);\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / (SQR(vIn.x) + sysz);\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / Zeps(SQR(vIn.x) + sysz);\n"
|
||||
<< "\t\treal_t s = sin(vIn.x);\n"
|
||||
<< "\t\treal_t c = cos(vIn.x);\n"
|
||||
<< "\t\treal_t sh = sinh(absV);\n"
|
||||
<< "\t\treal_t ch = cosh(absV);\n"
|
||||
<< "\t\treal_t d = c * sh / absV;\n"
|
||||
<< "\t\treal_t b = -s * sh / absV;\n"
|
||||
<< "\t\treal_t d = c * sh / Zeps(absV);\n"
|
||||
<< "\t\treal_t b = -s * sh / Zeps(absV);\n"
|
||||
<< "\t\treal_t stcv = s * ch;\n"
|
||||
<< "\t\treal_t nstcv = -stcv;\n"
|
||||
<< "\t\treal_t ctcv = c * ch;\n"
|
||||
@ -3362,6 +3362,11 @@ public:
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@ -3379,13 +3384,13 @@ public:
|
||||
{
|
||||
T sysz = SQR(helper.In.y) + SQR(helper.In.z);
|
||||
T absV = std::sqrt(sysz);
|
||||
T ni = m_Weight / (SQR(helper.In.x) + sysz);
|
||||
T ni = m_Weight / Zeps(SQR(helper.In.x) + sysz);
|
||||
T s = std::sin(absV);
|
||||
T c = std::cos(absV);
|
||||
T sh = std::sinh(helper.In.x);
|
||||
T ch = std::cosh(helper.In.x);
|
||||
T d = ch * s / absV;
|
||||
T b = sh * s / absV;
|
||||
T d = ch * s / Zeps(absV);
|
||||
T b = sh * s / Zeps(absV);
|
||||
T stcv = sh * c;
|
||||
T nstcv = -stcv;
|
||||
T ctcv = c * ch;
|
||||
@ -3401,13 +3406,13 @@ public:
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t sysz = SQR(vIn.y) + SQR(vIn.z);\n"
|
||||
<< "\t\treal_t absV = sqrt(sysz);\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / (SQR(vIn.x) + sysz);\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / Zeps(SQR(vIn.x) + sysz);\n"
|
||||
<< "\t\treal_t s = sin(absV);\n"
|
||||
<< "\t\treal_t c = cos(absV);\n"
|
||||
<< "\t\treal_t sh = sinh(vIn.x);\n"
|
||||
<< "\t\treal_t ch = cosh(vIn.x);\n"
|
||||
<< "\t\treal_t d = ch * s / absV;\n"
|
||||
<< "\t\treal_t b = sh * s / absV;\n"
|
||||
<< "\t\treal_t d = ch * s / Zeps(absV);\n"
|
||||
<< "\t\treal_t b = sh * s / Zeps(absV);\n"
|
||||
<< "\t\treal_t stcv = sh * c;\n"
|
||||
<< "\t\treal_t nstcv = -stcv;\n"
|
||||
<< "\t\treal_t ctcv = c * ch;\n"
|
||||
@ -3418,6 +3423,11 @@ public:
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@ -3438,7 +3448,7 @@ public:
|
||||
T c = std::cos(helper.In.x);
|
||||
T sh = std::sinh(absV);
|
||||
T ch = std::cosh(absV);
|
||||
T d = -m_Weight * s * sh / absV;
|
||||
T d = -m_Weight * s * sh / Zeps(absV);
|
||||
helper.Out.x = m_Weight * c * ch;
|
||||
helper.Out.y = d * helper.In.y;
|
||||
helper.Out.z = d * helper.In.z;
|
||||
@ -3454,7 +3464,7 @@ public:
|
||||
<< "\t\treal_t c = cos(vIn.x);\n"
|
||||
<< "\t\treal_t sh = sinh(absV);\n"
|
||||
<< "\t\treal_t ch = cosh(absV);\n"
|
||||
<< "\t\treal_t d = -xform->m_VariationWeights[" << varIndex << "] * s * sh / absV;\n"
|
||||
<< "\t\treal_t d = -xform->m_VariationWeights[" << varIndex << "] * s * sh / Zeps(absV);\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * c * ch;\n"
|
||||
<< "\t\tvOut.y = d * vIn.y;\n"
|
||||
@ -3465,7 +3475,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Hypot" };
|
||||
return vector<string> { "Hypot", "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
@ -3487,7 +3497,7 @@ public:
|
||||
T c = std::cos(absV);
|
||||
T sh = std::sinh(helper.In.x);
|
||||
T ch = std::cosh(helper.In.x);
|
||||
T d = -m_Weight * sh * s / absV;
|
||||
T d = m_Weight * sh * s / Zeps(absV);
|
||||
helper.Out.x = m_Weight * c * ch;
|
||||
helper.Out.y = d * helper.In.y;
|
||||
helper.Out.z = d * helper.In.z;
|
||||
@ -3503,7 +3513,7 @@ public:
|
||||
<< "\t\treal_t c = cos(absV);\n"
|
||||
<< "\t\treal_t sh = sinh(vIn.x);\n"
|
||||
<< "\t\treal_t ch = cosh(vIn.x);\n"
|
||||
<< "\t\treal_t d = -xform->m_VariationWeights[" << varIndex << "] * sh * s / absV;\n"
|
||||
<< "\t\treal_t d = xform->m_VariationWeights[" << varIndex << "] * sh * s / Zeps(absV);\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * c * ch;\n"
|
||||
<< "\t\tvOut.y = d * vIn.y;\n"
|
||||
@ -3514,7 +3524,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Hypot" };
|
||||
return vector<string> { "Hypot", "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
@ -3533,13 +3543,13 @@ public:
|
||||
{
|
||||
T sysz = SQR(helper.In.y) + SQR(helper.In.z);
|
||||
T absV = std::sqrt(sysz);
|
||||
T ni = m_Weight / (SQR(helper.In.x) + sysz);
|
||||
T ni = m_Weight / Zeps(SQR(helper.In.x) + sysz);
|
||||
T s = std::sin(helper.In.x);
|
||||
T c = std::cos(helper.In.x);
|
||||
T sh = std::sinh(absV);
|
||||
T ch = std::cosh(absV);
|
||||
T d = c * sh / absV;
|
||||
T b = -s * sh / absV;
|
||||
T d = c * sh / Zeps(absV);
|
||||
T b = -s * sh / Zeps(absV);
|
||||
T stcv = s * ch;
|
||||
T nstcv = -stcv;
|
||||
T ctcv = c * ch;
|
||||
@ -3555,13 +3565,13 @@ public:
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t sysz = SQR(vIn.y) + SQR(vIn.z);\n"
|
||||
<< "\t\treal_t absV = sqrt(sysz);\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / (SQR(vIn.x) + sysz);\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / Zeps(SQR(vIn.x) + sysz);\n"
|
||||
<< "\t\treal_t s = sin(vIn.x);\n"
|
||||
<< "\t\treal_t c = cos(vIn.x);\n"
|
||||
<< "\t\treal_t sh = sinh(absV);\n"
|
||||
<< "\t\treal_t ch = cosh(absV);\n"
|
||||
<< "\t\treal_t d = c * sh / absV;\n"
|
||||
<< "\t\treal_t b = -s * sh / absV;\n"
|
||||
<< "\t\treal_t d = c * sh / Zeps(absV);\n"
|
||||
<< "\t\treal_t b = -s * sh / Zeps(absV);\n"
|
||||
<< "\t\treal_t stcv = s * ch;\n"
|
||||
<< "\t\treal_t nstcv = -stcv;\n"
|
||||
<< "\t\treal_t ctcv = c * ch;\n"
|
||||
@ -3572,6 +3582,11 @@ public:
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@ -3589,19 +3604,19 @@ public:
|
||||
{
|
||||
T sysz = SQR(helper.In.y) + SQR(helper.In.z);
|
||||
T absV = std::sqrt(sysz);
|
||||
T ni = m_Weight / (SQR(helper.In.x) + sysz);
|
||||
T ni = m_Weight / Zeps(Sqr(SQR(helper.In.x) + sysz));
|
||||
T s = std::sin(absV);
|
||||
T c = std::cos(absV);
|
||||
T sh = std::sinh(helper.In.x);
|
||||
T ch = std::cosh(helper.In.x);
|
||||
T d = ch * s / absV;
|
||||
T b = sh * s / absV;
|
||||
T d = ch * s / Zeps(absV);
|
||||
T b = sh * s / Zeps(absV);
|
||||
T stcv = sh * c;
|
||||
T nstcv = -stcv;
|
||||
T ctcv = ch * c;
|
||||
helper.Out.x = (stcv * ctcv + d * b * sysz) * ni;
|
||||
helper.Out.y = -(nstcv * b * helper.In.y + d * helper.In.y * ctcv) * ni;
|
||||
helper.Out.z = -(nstcv * b * helper.In.z + d * helper.In.z * ctcv) * ni;
|
||||
helper.Out.x = (stcv * ctcv + d * b * sysz) * ni;
|
||||
helper.Out.y = (nstcv * b * helper.In.y + d * helper.In.y * ctcv) * ni;
|
||||
helper.Out.z = (nstcv * b * helper.In.z + d * helper.In.z * ctcv) * ni;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -3611,23 +3626,28 @@ public:
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t sysz = SQR(vIn.y) + SQR(vIn.z);\n"
|
||||
<< "\t\treal_t absV = sqrt(sysz);\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / (SQR(vIn.x) + sysz);\n"
|
||||
<< "\t\treal_t ni = xform->m_VariationWeights[" << varIndex << "] / Zeps(Sqr(SQR(vIn.x) + sysz));\n"
|
||||
<< "\t\treal_t s = sin(absV);\n"
|
||||
<< "\t\treal_t c = cos(absV);\n"
|
||||
<< "\t\treal_t sh = sinh(vIn.x);\n"
|
||||
<< "\t\treal_t ch = cosh(vIn.x);\n"
|
||||
<< "\t\treal_t d = ch * s / absV;\n"
|
||||
<< "\t\treal_t b = sh * s / absV;\n"
|
||||
<< "\t\treal_t d = ch * s / Zeps(absV);\n"
|
||||
<< "\t\treal_t b = sh * s / Zeps(absV);\n"
|
||||
<< "\t\treal_t stcv = sh * c;\n"
|
||||
<< "\t\treal_t nstcv = -stcv;\n"
|
||||
<< "\t\treal_t ctcv = ch * c;\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = (stcv * ctcv + d * b * sysz) * ni;\n"
|
||||
<< "\t\tvOut.y = -(nstcv * b * vIn.y + d * vIn.y * ctcv) * ni;\n"
|
||||
<< "\t\tvOut.z = -(nstcv * b * vIn.z + d * vIn.z * ctcv) * ni;\n"
|
||||
<< "\t\tvOut.x = (stcv * ctcv + d * b * sysz) * ni;\n"
|
||||
<< "\t\tvOut.y = (nstcv * b * vIn.y + d * vIn.y * ctcv) * ni;\n"
|
||||
<< "\t\tvOut.z = (nstcv * b * vIn.z + d * vIn.z * ctcv) * ni;\n"
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Sqr" };
|
||||
}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@ -3649,7 +3669,7 @@ public:
|
||||
T c = std::cos(helper.In.x);
|
||||
T sh = std::sinh(absV);
|
||||
T ch = std::cosh(absV);
|
||||
T d = ni * c * sh / absV;
|
||||
T d = ni * c * sh / Zeps(absV);
|
||||
helper.Out.x = s * ch * ni;
|
||||
helper.Out.y = -(d * helper.In.y);
|
||||
helper.Out.z = -(d * helper.In.z);
|
||||
@ -3666,7 +3686,7 @@ public:
|
||||
<< "\t\treal_t c = cos(vIn.x);\n"
|
||||
<< "\t\treal_t sh = sinh(absV);\n"
|
||||
<< "\t\treal_t ch = cosh(absV);\n"
|
||||
<< "\t\treal_t d = ni * c * sh / absV;\n"
|
||||
<< "\t\treal_t d = ni * c * sh / Zeps(absV);\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = s * ch * ni;\n"
|
||||
<< "\t\tvOut.y = -(d * vIn.y);\n"
|
||||
@ -3677,7 +3697,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Hypot" };
|
||||
return vector<string> { "Hypot", "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
@ -3700,7 +3720,7 @@ public:
|
||||
T c = std::cos(absV);
|
||||
T sh = std::sinh(helper.In.x);
|
||||
T ch = std::cosh(helper.In.x);
|
||||
T d = ni * ch * s / absV;
|
||||
T d = ni * ch * s / Zeps(absV);
|
||||
helper.Out.x = sh * c * ni;
|
||||
helper.Out.y = -(d * helper.In.y);
|
||||
helper.Out.z = -(d * helper.In.z);
|
||||
@ -3717,7 +3737,7 @@ public:
|
||||
<< "\t\treal_t c = cos(absV);\n"
|
||||
<< "\t\treal_t sh = sinh(vIn.x);\n"
|
||||
<< "\t\treal_t ch = cosh(vIn.x);\n"
|
||||
<< "\t\treal_t d = ni * ch * s / absV;\n"
|
||||
<< "\t\treal_t d = ni * ch * s / Zeps(absV);\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = sh * c * ni;\n"
|
||||
<< "\t\tvOut.y = -(d * vIn.y);\n"
|
||||
@ -3728,7 +3748,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Hypot" };
|
||||
return vector<string> { "Hypot", "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
@ -3749,7 +3769,7 @@ public:
|
||||
T e = std::exp(helper.In.x);
|
||||
T s = std::sin(absV);
|
||||
T c = std::cos(absV);
|
||||
T a = e * s / absV;
|
||||
T a = e * s / Zeps(absV);
|
||||
helper.Out.x = m_Weight * e * c;
|
||||
helper.Out.y = m_Weight * a * helper.In.y;
|
||||
helper.Out.z = m_Weight * a * helper.In.z;
|
||||
@ -3764,7 +3784,7 @@ public:
|
||||
<< "\t\treal_t e = exp(vIn.x);\n"
|
||||
<< "\t\treal_t s = sin(absV);\n"
|
||||
<< "\t\treal_t c = cos(absV);\n"
|
||||
<< "\t\treal_t a = e * s / absV;\n"
|
||||
<< "\t\treal_t a = e * s / Zeps(absV);\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * e * c;\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * a * vIn.y;\n"
|
||||
@ -3775,7 +3795,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Hypot" };
|
||||
return vector<string> { "Hypot", "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
@ -3796,7 +3816,7 @@ public:
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T absV = VarFuncs<T>::Hypot(helper.In.y, helper.In.z);
|
||||
T c = m_Weight * std::atan2(absV, helper.In.x) / absV;
|
||||
T c = m_Weight * std::atan2(absV, helper.In.x) / Zeps(absV);
|
||||
helper.Out.x = std::log(SQR(helper.In.x) + SQR(absV)) * m_Denom;
|
||||
helper.Out.y = c * helper.In.y;
|
||||
helper.Out.z = c * helper.In.z;
|
||||
@ -3812,7 +3832,7 @@ public:
|
||||
string denom = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t absV = Hypot(vIn.y, vIn.z);\n"
|
||||
<< "\t\treal_t c = xform->m_VariationWeights[" << varIndex << "] * atan2(absV, vIn.x) / absV;\n"
|
||||
<< "\t\treal_t c = xform->m_VariationWeights[" << varIndex << "] * atan2(absV, vIn.x) / Zeps(absV);\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = log(SQR(vIn.x) + SQR(absV)) * " << denom << ";\n"
|
||||
<< "\t\tvOut.y = c * vIn.y;\n"
|
||||
@ -3823,7 +3843,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Hypot" };
|
||||
return vector<string> { "Hypot", "Zeps" };
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
|
@ -681,6 +681,10 @@ public:
|
||||
}
|
||||
|
||||
outPoint->m_ColorX = iterHelper.m_Color.x + m_DirectColor * (outPoint->m_ColorX - iterHelper.m_Color.x);
|
||||
|
||||
if (std::isnan(outPoint->m_ColorX))
|
||||
outPoint->m_ColorX = 0;
|
||||
|
||||
//Has the trajectory of x or y gone either to infinity, or too close to zero?
|
||||
return BadVal(outPoint->m_X) || BadVal(outPoint->m_Y)/* || BadVal(outPoint->m_Z)*/;
|
||||
}
|
||||
|
@ -476,6 +476,8 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
#else
|
||||
putenv(const_cast<char*>("GPU_MAX_ALLOC_PERCENT=100"));
|
||||
#endif
|
||||
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
|
||||
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
|
||||
|
||||
if (!opt.Populate(argc, argv, eOptionUse::OPT_USE_ANIMATE))
|
||||
{
|
||||
|
@ -203,6 +203,8 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(const Ember<T>& ember,
|
||||
}
|
||||
|
||||
xformFuncs << "\toutPoint->m_ColorX = tempColor + xform->m_DirectColor * (outPoint->m_ColorX - tempColor);\n";
|
||||
xformFuncs << "\tif (isnan(outPoint->m_ColorX))\n";
|
||||
xformFuncs << "\t outPoint->m_ColorX = 0.0; \n";
|
||||
xformFuncs << "}\n"
|
||||
<< "\n";
|
||||
i++;
|
||||
|
@ -1027,9 +1027,9 @@ bool OpenCLWrapper::CreateSPK(const string& name, const string& program, const s
|
||||
spk.m_Program = cl::Program(m_Context, spk.m_Source);
|
||||
|
||||
if (doublePrecision)
|
||||
err = spk.m_Program.build(m_DeviceVec, "-cl-mad-enable");//Tinker with other options later.
|
||||
err = spk.m_Program.build(m_DeviceVec, "-cl-mad-enable -cl-no-signed-zeros -cl-denorms-are-zero");//Tinker with other options later.
|
||||
else
|
||||
err = spk.m_Program.build(m_DeviceVec, "-cl-mad-enable -cl-no-signed-zeros -cl-single-precision-constant");
|
||||
err = spk.m_Program.build(m_DeviceVec, "-cl-mad-enable -cl-no-signed-zeros -cl-single-precision-constant -cl-denorms-are-zero");
|
||||
|
||||
//err = spk.m_Program.build(m_DeviceVec, "-cl-single-precision-constant");
|
||||
//err = spk.m_Program.build(m_DeviceVec, "-cl-mad-enable -cl-single-precision-constant");
|
||||
|
@ -977,7 +977,7 @@ bool RendererCL<T, bucketT>::RunIter(size_t iterCount, size_t temporalSample, si
|
||||
if (m_Devices.size() >= launches)
|
||||
{
|
||||
launches = m_Devices.size();
|
||||
adjustedIterCountPerKernel = size_t(ceil(ceil(double(iterCount) / m_Devices.size()) / IterGridKernelCount()));
|
||||
adjustedIterCountPerKernel = size_t(std::ceil(std::ceil(double(iterCount) / m_Devices.size()) / IterGridKernelCount()));
|
||||
}
|
||||
|
||||
size_t fuseFreq = Renderer<T, bucketT>::SubBatchSize() / adjustedIterCountPerKernel;//Use the base sbs to determine when to fuse.
|
||||
|
@ -859,6 +859,8 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
#else
|
||||
putenv(const_cast<char*>("GPU_MAX_ALLOC_PERCENT=100"));
|
||||
#endif
|
||||
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
|
||||
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
|
||||
|
||||
if (!opt.Populate(argc, argv, eOptionUse::OPT_USE_GENOME))
|
||||
{
|
||||
|
@ -367,6 +367,8 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
#else
|
||||
putenv(const_cast<char*>("GPU_MAX_ALLOC_PERCENT=100"));
|
||||
#endif
|
||||
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
|
||||
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
|
||||
|
||||
if (!opt.Populate(argc, argv, eOptionUse::OPT_USE_RENDER))
|
||||
{
|
||||
|
@ -93,23 +93,23 @@ void MakeTestAllVarsRegPrePost(vector<Ember<T>>& embers)
|
||||
paletteList->Add("flam3-palettes.xml");
|
||||
Timing t;
|
||||
Ember<T> emberNoVars;
|
||||
emberNoVars.m_FinalRasW = 640;
|
||||
emberNoVars.m_FinalRasH = 480;
|
||||
emberNoVars.m_FinalRasW = 1024;
|
||||
emberNoVars.m_FinalRasH = 1024;
|
||||
emberNoVars.m_Quality = 100;
|
||||
Xform<T> xform1(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform2(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform3(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform4(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform5(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform6(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform7(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
//Xform<T> xform4(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
//Xform<T> xform5(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
//Xform<T> xform6(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
//Xform<T> xform7(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
emberNoVars.AddXform(xform1);
|
||||
emberNoVars.AddXform(xform2);
|
||||
emberNoVars.AddXform(xform3);
|
||||
emberNoVars.AddXform(xform4);
|
||||
emberNoVars.AddXform(xform5);
|
||||
emberNoVars.AddXform(xform6);
|
||||
emberNoVars.AddXform(xform7);
|
||||
//emberNoVars.AddXform(xform4);
|
||||
//emberNoVars.AddXform(xform5);
|
||||
//emberNoVars.AddXform(xform6);
|
||||
//emberNoVars.AddXform(xform7);
|
||||
ss << "NoVars";
|
||||
emberNoVars.m_Name = ss.str();
|
||||
ss.str("");
|
||||
@ -126,53 +126,51 @@ void MakeTestAllVarsRegPrePost(vector<Ember<T>>& embers)
|
||||
*/
|
||||
Ember<T> ember1;
|
||||
unique_ptr<Variation<T>> regVar(varList->GetVariationCopy(index, eVariationType::VARTYPE_REG));
|
||||
unique_ptr<Variation<T>> preVar(varList->GetVariationCopy("pre_" + regVar->Name()));
|
||||
unique_ptr<Variation<T>> postVar(varList->GetVariationCopy("post_" + regVar->Name()));
|
||||
ember1.m_FinalRasW = 640;
|
||||
ember1.m_FinalRasH = 480;
|
||||
ember1.m_Quality = 100;
|
||||
//unique_ptr<Variation<T>> preVar(varList->GetVariationCopy("pre_" + regVar->Name()));
|
||||
//unique_ptr<Variation<T>> postVar(varList->GetVariationCopy("post_" + regVar->Name()));
|
||||
ember1.m_FinalRasW = 1024;
|
||||
ember1.m_FinalRasH = 1024;
|
||||
ember1.m_Quality = 500;
|
||||
Xform<T> xform1(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform2(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform3(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform4(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform5(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform6(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
Xform<T> xform7(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
|
||||
if (preVar.get() && postVar.get())
|
||||
{
|
||||
xform1.AddVariation(preVar->Copy());
|
||||
xform2.AddVariation(regVar->Copy());
|
||||
xform3.AddVariation(postVar->Copy());
|
||||
xform4.AddVariation(preVar->Copy());
|
||||
xform4.AddVariation(regVar->Copy());
|
||||
xform5.AddVariation(preVar->Copy());
|
||||
xform5.AddVariation(postVar->Copy());
|
||||
xform6.AddVariation(regVar->Copy());
|
||||
xform6.AddVariation(postVar->Copy());
|
||||
xform7.AddVariation(preVar->Copy());
|
||||
xform7.AddVariation(regVar->Copy());
|
||||
xform7.AddVariation(postVar->Copy());
|
||||
ember1.AddXform(xform1);
|
||||
ember1.AddXform(xform2);
|
||||
ember1.AddXform(xform3);
|
||||
ember1.AddXform(xform4);
|
||||
ember1.AddXform(xform5);
|
||||
ember1.AddXform(xform6);
|
||||
ember1.AddXform(xform7);
|
||||
}
|
||||
else
|
||||
//Xform<T> xform4(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
//Xform<T> xform5(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
//Xform<T> xform6(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
//Xform<T> xform7(0.25f, rand.Frand01<T>(), rand.Frand11<T>(), 1, rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>(), rand.Frand11<T>());
|
||||
//if (preVar.get() && postVar.get())
|
||||
//{
|
||||
//xform1.AddVariation(preVar->Copy());
|
||||
//xform2.AddVariation(regVar->Copy());
|
||||
//xform3.AddVariation(postVar->Copy());
|
||||
//xform4.AddVariation(preVar->Copy());
|
||||
//xform4.AddVariation(regVar->Copy());
|
||||
//xform5.AddVariation(preVar->Copy());
|
||||
//xform5.AddVariation(postVar->Copy());
|
||||
//xform6.AddVariation(regVar->Copy());
|
||||
//xform6.AddVariation(postVar->Copy());
|
||||
//xform7.AddVariation(preVar->Copy());
|
||||
//xform7.AddVariation(regVar->Copy());
|
||||
//xform7.AddVariation(postVar->Copy());
|
||||
//ember1.AddXform(xform1);
|
||||
//ember1.AddXform(xform2);
|
||||
//ember1.AddXform(xform3);
|
||||
//ember1.AddXform(xform4);
|
||||
//ember1.AddXform(xform5);
|
||||
//ember1.AddXform(xform6);
|
||||
//ember1.AddXform(xform7);
|
||||
//}
|
||||
//else
|
||||
{
|
||||
xform1.AddVariation(regVar->Copy());
|
||||
xform2.AddVariation(regVar->Copy());
|
||||
xform3.AddVariation(regVar->Copy());
|
||||
xform4.AddVariation(regVar->Copy());
|
||||
//xform4.AddVariation(regVar->Copy());
|
||||
ember1.AddXform(xform1);
|
||||
ember1.AddXform(xform2);
|
||||
ember1.AddXform(xform3);
|
||||
ember1.AddXform(xform4);
|
||||
//ember1.AddXform(xform4);
|
||||
}
|
||||
|
||||
ss << index << "_" << regVar->Name();
|
||||
ember1.m_Name = ss.str();
|
||||
ss.str("");
|
||||
@ -189,7 +187,7 @@ void MakeTestAllVarsRegPrePostComboFile(const string& filename)
|
||||
EmberToXml<float> writer;
|
||||
vector<Ember<float>> embers;
|
||||
MakeTestAllVarsRegPrePost(embers);
|
||||
writer.Save(filename, embers, 0, true, false, true);
|
||||
writer.Save(filename, embers, 0, true, true, false);
|
||||
}
|
||||
|
||||
void TestAtomicAdd()
|
||||
@ -1933,17 +1931,19 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
vector<Ember<double>> dv;
|
||||
list<Ember<float>> fl;
|
||||
list<Ember<double>> dl;
|
||||
string line = "title=\"cj_aerie\" smooth=no", delim = " =\"";
|
||||
auto vec = Split(line, delim, true);
|
||||
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
|
||||
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
|
||||
/* string line = "title=\"cj_aerie\" smooth=no", delim = " =\"";
|
||||
auto vec = Split(line, delim, true);
|
||||
|
||||
for (auto& s : vec) cout << s << endl;
|
||||
for (auto& s : vec) cout << s << endl;
|
||||
|
||||
line = "index=0 color=2177354", delim = " =";
|
||||
vec = Split(line, delim, true);
|
||||
line = "index=0 color=2177354", delim = " =";
|
||||
vec = Split(line, delim, true);
|
||||
|
||||
for (auto& s : vec) cout << s << endl;
|
||||
|
||||
for (auto& s : vec) cout << s << endl;
|
||||
|
||||
/*
|
||||
EmberContainerTester<float>::TestEmberContainer(fv);
|
||||
EmberContainerTester<double>::TestEmberContainer(dv);
|
||||
EmberContainerTester<float>::TestEmberContainer(fl);
|
||||
@ -1957,9 +1957,10 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
/* TestRotate<float>();
|
||||
TestRotate<double>();
|
||||
return 1;
|
||||
MakeTestAllVarsRegPrePostComboFile("testallvarsout.flame");
|
||||
return 0;
|
||||
|
||||
*/
|
||||
MakeTestAllVarsRegPrePostComboFile("testallvarsout.flame");
|
||||
return 0;
|
||||
/*
|
||||
|
||||
TestThreadedKernel();
|
||||
|
||||
@ -1972,8 +1973,8 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
cout << "log10(" << d << ") = " << std::max<uint>(1u, uint(std::log10(d)) + 1u) << endl;
|
||||
d *= 10;
|
||||
cout << "log10(" << d << ") = " << std::max<uint>(1u, uint(std::log10(d)) + 1u) << endl;
|
||||
d *= 10;
|
||||
}
|
||||
|
||||
return 0;*/
|
||||
|
@ -259,6 +259,12 @@
|
||||
<height>91</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -470,6 +476,12 @@
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -679,6 +691,12 @@
|
||||
<height>199</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
|
@ -206,6 +206,12 @@
|
||||
<height>88</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -407,6 +413,12 @@
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -488,6 +500,12 @@
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -569,6 +587,12 @@
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -672,6 +696,12 @@
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -782,6 +812,12 @@
|
||||
<height>264</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -1114,6 +1150,12 @@
|
||||
<height>110</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -1314,6 +1356,12 @@
|
||||
<height>154</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -1559,6 +1607,12 @@
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -1656,6 +1710,12 @@
|
||||
<height>110</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -1907,6 +1967,8 @@
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
@ -2060,6 +2122,12 @@
|
||||
<height>21</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -2175,6 +2243,12 @@
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QTableWidget" name="PaletteListTable">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
@ -2277,6 +2351,12 @@
|
||||
<height>67</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -2944,6 +3024,8 @@
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
@ -3131,6 +3213,8 @@
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
@ -3461,7 +3545,8 @@
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<kerning>true</kerning>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
@ -3791,6 +3876,12 @@
|
||||
<height>90</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -4588,6 +4679,12 @@
|
||||
<height>90</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -5514,6 +5611,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -6011,6 +6114,12 @@
|
||||
<height>126</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -6149,6 +6258,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
@ -6520,6 +6635,8 @@
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
@ -6961,6 +7078,12 @@
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<widget class="LibraryTreeWidget" name="LibraryTree">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
@ -7617,6 +7740,12 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
|
@ -20,6 +20,8 @@ int main(int argc, char* argv[])
|
||||
QMessageBox::critical(QApplication::desktop(), "Error", "Fractorium cannot be run in test mode, undefine ISAAC_FLAM3_DEBUG first.");
|
||||
return 1;
|
||||
#endif
|
||||
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
|
||||
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
|
||||
auto vf = VarFuncs<float>::Instance();//Create instances that will stay alive until the program exits.
|
||||
auto vlf = VariationList<float>::Instance();
|
||||
auto palf = PaletteList<float>::Instance();
|
||||
|
@ -189,6 +189,12 @@
|
||||
<height>91</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -466,6 +472,12 @@ in interactive mode for each mouse movement</string>
|
||||
<height>67</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -659,6 +671,12 @@ in interactive mode for each mouse movement</string>
|
||||
<height>67</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>942</width>
|
||||
<height>542</height>
|
||||
<width>859</width>
|
||||
<height>540</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -27,10 +27,13 @@
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="LeftSideVertialLayout">
|
||||
<layout class="QVBoxLayout" name="LeftSideVerticalLayout">
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="LeftTopHorizontalLayout">
|
||||
<item>
|
||||
@ -50,10 +53,29 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="PaletteFilenameCombo"/>
|
||||
<widget class="QComboBox" name="PaletteFilenameCombo">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>365</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="PaletteListTable">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>365</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Panel</enum>
|
||||
</property>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "FractoriumPch.h"
|
||||
#include "FractoriumPch.h"
|
||||
#include "PaletteEditor.h"
|
||||
|
||||
/// <summary>
|
||||
@ -578,4 +578,6 @@ void PaletteEditor::EnablePaletteControls()
|
||||
ui->RemoveColorButton->setEnabled(b);
|
||||
ui->ResetColorsButton->setEnabled(b);
|
||||
ui->ArrowsSpinBox->setEnabled(b);
|
||||
ui->CreatePaletteFromImageButton->setEnabled(b);
|
||||
ui->CreatePaletteAgainFromImageButton->setEnabled(b);
|
||||
}
|
@ -41,6 +41,12 @@
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QTableWidget" name="VariationsTable">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="mouseTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user