--User changes

-Remove the Type field from the variations tree and instead just put the type indicator icon next to the variation name.
 -Double clicking to toggle variation parameter spinners now resets the value to the default if there is one, else it uses zero. If it is already using the default, it is toggled to 0.
 -Add a new button to toggle xaos on and off.
 -When duplicating a flame, insert it immediately after the one being duplicated instead of at the end of the file.
 -When switching between flames in a file, keep the same xform index selected rather than resetting it to the first xform each time.
 -Create a threaded writer for the final render and EmberAnimate so the rendering process does not get delayed by file saving which may take a long time.
 -Remove warning which said "Frames per rot cannot be greater than one while Rotations is zero" when generating a sequence.
 -Add the Circle_Rand variation from Chaotica.
 -Add tool tips to clarify the following items:
 --Auto Unique Filenames checkbox in the options dialog.
 --Xaos table headers.

--Bug fixes
 -Generating sequences using the following variations would be done incorrectly: circletrans1, collideoscope, crob, curlsp, glynnsim1, glynnsim2, hypercrop, julian, julian, mobiusn, nblur, waves2, wavesn.
 -Adding/removing nodes from the color curve had accidentally been disabled.
 -The applied xaos weight table was not showing normalized weight values.
 -Changing the size of a flame was not observing the Apply To All checkbox.
 -Do not clamp the Rotate field to +/-180, because this causes the rotation to switch from CW to CCW during sequence generation. Instead, leave it exactly as the user entered it so the rotations proceed in the same direction.
This commit is contained in:
Person
2023-11-21 22:58:22 -07:00
parent 1a1cb8b0f2
commit 745f06d29d
47 changed files with 616 additions and 326 deletions

View File

@ -497,6 +497,7 @@ uint Timing::m_ProcessorCount;
EXPORTPREPOSTREGVAR(Inkdrop, T) \
EXPORTPREPOSTREGVAR(HexModulus, T) \
EXPORTPREPOSTREGVAR(Vignette, T) \
EXPORTPREPOSTREGVAR(Circle_Rand, T) \
template EMBER_API class VariationList<T>; \
template EMBER_API class SpatialFilter<T>; \
template EMBER_API class GaussianFilter<T>; \

View File

@ -37,7 +37,7 @@ static void sincos(float x, float* s, float* c)
namespace EmberNs
{
#define EMBER_VERSION "23.23.8.1"
#define EMBER_VERSION "23.23.8.100"
//#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 EPS std::numeric_limits<T>::epsilon()//Apoplugin.h uses -20, but it's more mathematically correct to do it this way.

View File

@ -96,6 +96,7 @@ enum class eVariationId : glm::uint
VAR_CIRCLERAND,
VAR_CIRCLESPLIT,
VAR_CIRCLETRANS1,
VAR_CIRCLE_RAND,
VAR_CIRCLIZE ,
VAR_CIRCLIZE2 ,
VAR_CIRCUS,
@ -514,6 +515,7 @@ enum class eVariationId : glm::uint
VAR_PRE_CIRCLERAND,
VAR_PRE_CIRCLESPLIT,
VAR_PRE_CIRCLETRANS1,
VAR_PRE_CIRCLE_RAND,
VAR_PRE_CIRCLIZE,
VAR_PRE_CIRCLIZE2,
VAR_PRE_CIRCUS,
@ -931,6 +933,7 @@ enum class eVariationId : glm::uint
VAR_POST_CIRCLERAND,
VAR_POST_CIRCLESPLIT,
VAR_POST_CIRCLETRANS1,
VAR_POST_CIRCLE_RAND,
VAR_POST_CIRCLIZE,
VAR_POST_CIRCLIZE2,
VAR_POST_CIRCUS,
@ -2213,14 +2216,12 @@ public:
if (!_stricmp(param.Name().c_str(), name))
{
param.Set(val);
this->Precalc();
b = true;
break;
}
}
if (b)
this->Precalc();
return b;
}
@ -2235,10 +2236,11 @@ public:
bool b = false;
if (index < m_Params.size())
{
m_Params[index].Set(val);
if (b)
this->Precalc();
b = true;
}
return b;
}
@ -2268,8 +2270,6 @@ public:
void Clear()
{
for (auto& param : m_Params) *(param.Param()) = 0;
this->Precalc();
}
/// <summary>

View File

@ -330,6 +330,7 @@ VariationList<T>::VariationList()
ADDPREPOSTREGVAR(CircleLinear)
ADDPREPOSTREGVAR(CircleRand)
ADDPREPOSTREGVAR(CircleTrans1)
ADDPREPOSTREGVAR(Circle_Rand)
ADDPREPOSTREGVAR(Cubic3D)
ADDPREPOSTREGVAR(CubicLattice3D)
ADDPREPOSTREGVAR(Foci3D)

View File

@ -1691,7 +1691,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string angle = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string angle = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string dist = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string vSin = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Precalc.
string vfCos = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
@ -1729,14 +1729,14 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Angle, prefix + "perspective_angle"));//Params.
m_Params.push_back(ParamWithName<T>(&m_Angle, prefix + "perspective_angle"));
m_Params.push_back(ParamWithName<T>(&m_Dist, prefix + "perspective_dist"));
m_Params.push_back(ParamWithName<T>(true, &m_Vsin, prefix + "perspective_vsin"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_VfCos, prefix + "perspective_vfcos"));
}
private:
T m_Angle;//Params.
T m_Angle;
T m_Dist;
T m_Vsin;//Precalc.
T m_VfCos;
@ -1808,7 +1808,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string dist = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string dist = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string power = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string rn = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Precalc.
string cn = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
@ -1842,14 +1842,14 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Dist, prefix + "julian_dist", 1));//Params.
m_Params.push_back(ParamWithName<T>(&m_Dist, prefix + "julian_dist", 1));
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "julian_power", 1, eParamType::INTEGER_NONZERO));
m_Params.push_back(ParamWithName<T>(true, &m_Rn, prefix + "julian_rn"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_Cn, prefix + "julian_cn"));
}
private:
T m_Dist;//Params.
T m_Dist;
T m_Power;
T m_Rn;//Precalc.
T m_Cn;
@ -1900,7 +1900,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string dist = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string dist = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string power = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string rn = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Precalc.
string cn = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
@ -1954,14 +1954,14 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Dist, prefix + "juliascope_dist", 1));//Params.
m_Params.push_back(ParamWithName<T>(&m_Dist, prefix + "juliascope_dist", 1));
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "juliascope_power", 1, eParamType::REAL_NONZERO));
m_Params.push_back(ParamWithName<T>(true, &m_Rn, prefix + "juliascope_rn"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_Cn, prefix + "juliascope_cn"));
}
private:
T m_Dist;//Params.
T m_Dist;
T m_Power;
T m_Rn;//Precalc.
T m_Cn;
@ -2113,7 +2113,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string angle = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string angle = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string spin = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Precalc.
string zoom = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
ss << "\t{\n"
@ -2144,13 +2144,13 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Angle, prefix + "radial_blur_angle"));//Params.
m_Params.push_back(ParamWithName<T>(&m_Angle, prefix + "radial_blur_angle"));
m_Params.push_back(ParamWithName<T>(true, &m_Spin, prefix + "radial_blur_spin"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_Zoom, prefix + "radial_blur_zoom"));
}
private:
T m_Angle;//Params.
T m_Angle;
T m_Spin;//Precalc.
T m_Zoom;
};
@ -2222,7 +2222,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Slices, prefix + "pie_slices", 6, eParamType::INTEGER_NONZERO, 1));
m_Params.push_back(ParamWithName<T>(&m_Rotation, prefix + "pie_rotation", T(0.5), eParamType::REAL_CYCLIC, 0, M_2PI));
m_Params.push_back(ParamWithName<T>(&m_Thickness, prefix + "pie_thickness", T(0.5), eParamType::REAL, 0, 1));
m_Params.push_back(ParamWithName<T>(true, &m_Pi2Slices, prefix + "pie_pi2_slices"));
m_Params.push_back(ParamWithName<T>(true, &m_Pi2Slices, prefix + "pie_pi2_slices"));//Precalc.
}
private:
@ -2326,7 +2326,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "ngon_power", 3));
m_Params.push_back(ParamWithName<T>(&m_Circle, prefix + "ngon_circle", 1));
m_Params.push_back(ParamWithName<T>(&m_Corners, prefix + "ngon_corners", 2));
m_Params.push_back(ParamWithName<T>(true, &m_CSides, prefix + "ngon_csides"));
m_Params.push_back(ParamWithName<T>(true, &m_CSides, prefix + "ngon_csides"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_CSidesInv, prefix + "ngon_csides_inv"));
m_Params.push_back(ParamWithName<T>(true, &m_CPower, prefix + "ngon_cpower"));
}
@ -2986,7 +2986,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string rot = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string rot = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string twist = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string sinAdd = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Precalc.
string cosAdd = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
@ -3037,7 +3037,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Rot, prefix + "disc2_rot"));//Params.
m_Params.push_back(ParamWithName<T>(&m_Rot, prefix + "disc2_rot"));
m_Params.push_back(ParamWithName<T>(&m_Twist, prefix + "disc2_twist"));
m_Params.push_back(ParamWithName<T>(true, &m_SinAdd, prefix + "disc2_sin_add"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_CosAdd, prefix + "disc2_cos_add"));
@ -3045,7 +3045,7 @@ protected:
}
private:
T m_Rot;//Params.
T m_Rot;
T m_Twist;
T m_SinAdd;//Precalc.
T m_CosAdd;
@ -3087,7 +3087,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string m = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string m = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string n1 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string n2 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string n3 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
@ -3131,7 +3131,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_M, prefix + "super_shape_m"));//Params.
m_Params.push_back(ParamWithName<T>(&m_M, prefix + "super_shape_m"));
m_Params.push_back(ParamWithName<T>(&m_N1, prefix + "super_shape_n1", 1));
m_Params.push_back(ParamWithName<T>(&m_N2, prefix + "super_shape_n2", 1));
m_Params.push_back(ParamWithName<T>(&m_N3, prefix + "super_shape_n3", 1));
@ -3142,7 +3142,7 @@ protected:
}
private:
T m_M;//Params.
T m_M;
T m_N1;
T m_N2;
T m_N3;
@ -3493,14 +3493,14 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "bent2_x", 1));//Params.
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "bent2_x", 1));
m_Params.push_back(ParamWithName<T>(&m_Y, prefix + "bent2_y", 1));
m_Params.push_back(ParamWithName<T>(true, &m_Vx, prefix + "bent2_vx"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_Vy, prefix + "bent2_vy"));
}
private:
T m_X;//Params.
T m_X;
T m_Y;
T m_Vx;//Precalc.
T m_Vy;
@ -3649,14 +3649,14 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Shift, prefix + "bipolar_shift"));//Params.
m_Params.push_back(ParamWithName<T>(&m_Shift, prefix + "bipolar_shift"));
m_Params.push_back(ParamWithName<T>(true, &m_S, prefix + "bipolar_s"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_V, prefix + "bipolar_v"));
m_Params.push_back(ParamWithName<T>(true, &m_V4, prefix + "bipolar_v4"));
}
private:
T m_Shift;//Params.
T m_Shift;
T m_S;//Precalc.
T m_V;
T m_V4;
@ -4014,7 +4014,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_PowerR, prefix + "cpow_r", 1));//Params.
m_Params.push_back(ParamWithName<T>(&m_PowerR, prefix + "cpow_r", 1));
m_Params.push_back(ParamWithName<T>(&m_PowerI, prefix + "cpow_i"));
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "cpow_power", 1, eParamType::INTEGER_NONZERO));
m_Params.push_back(ParamWithName<T>(true, &m_C, prefix + "cpow_c"));//Precalc.
@ -4023,7 +4023,7 @@ protected:
}
private:
T m_PowerR;//Params.
T m_PowerR;
T m_PowerI;
T m_Power;
T m_C;//Precalc.
@ -4096,7 +4096,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_XAmp, prefix + "curve_xamp"));//Params.
m_Params.push_back(ParamWithName<T>(&m_XAmp, prefix + "curve_xamp"));
m_Params.push_back(ParamWithName<T>(&m_YAmp, prefix + "curve_yamp"));
m_Params.push_back(ParamWithName<T>(&m_XLength, prefix + "curve_xlength", 1));
m_Params.push_back(ParamWithName<T>(&m_YLength, prefix + "curve_ylength", 1));
@ -4107,7 +4107,7 @@ protected:
}
private:
T m_XAmp;//Params.
T m_XAmp;
T m_YAmp;
T m_XLength;
T m_YLength;
@ -4472,13 +4472,13 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Beta, prefix + "escher_beta"));//Params.
m_Params.push_back(ParamWithName<T>(&m_Beta, prefix + "escher_beta"));
m_Params.push_back(ParamWithName<T>(true, &m_C, prefix + "escher_beta_c"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_D, prefix + "escher_beta_d"));
}
private:
T m_Beta;//Params.
T m_Beta;
T m_C;//Precalc.
T m_D;
};
@ -4806,14 +4806,14 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "modulus_x", 1));//Params.
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "modulus_x", 1));
m_Params.push_back(ParamWithName<T>(&m_Y, prefix + "modulus_y", 1));
m_Params.push_back(ParamWithName<T>(true, &m_XRange, prefix + "modulus_xrange"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_YRange, prefix + "modulus_yrange"));
}
private:
T m_X;//Params.
T m_X;
T m_Y;
T m_XRange;//Precalc.
T m_YRange;
@ -4910,7 +4910,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Separation, prefix + "oscilloscope_separation", 1));//Params.
m_Params.push_back(ParamWithName<T>(&m_Separation, prefix + "oscilloscope_separation", 1));
m_Params.push_back(ParamWithName<T>(&m_Frequency, prefix + "oscilloscope_frequency", T(M_PI)));
m_Params.push_back(ParamWithName<T>(&m_Amplitude, prefix + "oscilloscope_amplitude", 1));
m_Params.push_back(ParamWithName<T>(&m_Damping, prefix + "oscilloscope_damping"));
@ -4918,7 +4918,7 @@ protected:
}
private:
T m_Separation;//Params.
T m_Separation;
T m_Frequency;
T m_Amplitude;
T m_Damping;
@ -5015,7 +5015,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Separation, prefix + "oscilloscope2_separation", 1, eParamType::REAL, 0));//Params.
m_Params.push_back(ParamWithName<T>(&m_Separation, prefix + "oscilloscope2_separation", 1, eParamType::REAL, 0));
m_Params.push_back(ParamWithName<T>(&m_FrequencyX, prefix + "oscilloscope2_frequencyx", T(M_PI)));
m_Params.push_back(ParamWithName<T>(&m_FrequencyY, prefix + "oscilloscope2_frequencyy", T(M_PI)));
m_Params.push_back(ParamWithName<T>(&m_Amplitude, prefix + "oscilloscope2_amplitude", 1));
@ -5026,7 +5026,7 @@ protected:
}
private:
T m_Separation;//Params.
T m_Separation;
T m_FrequencyX;
T m_FrequencyY;
T m_Amplitude;
@ -5391,7 +5391,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "separation_x", 1));//Params.
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "separation_x", 1));
m_Params.push_back(ParamWithName<T>(&m_XInside, prefix + "separation_xinside"));
m_Params.push_back(ParamWithName<T>(&m_Y, prefix + "separation_y", 1));
m_Params.push_back(ParamWithName<T>(&m_YInside, prefix + "separation_yinside"));
@ -5400,7 +5400,7 @@ protected:
}
private:
T m_X;//Params.
T m_X;
T m_XInside;
T m_Y;
T m_YInside;
@ -5481,14 +5481,14 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_XSize, prefix + "split_xsize", T(0.5)));//Params.
m_Params.push_back(ParamWithName<T>(&m_XSize, prefix + "split_xsize", T(0.5)));
m_Params.push_back(ParamWithName<T>(&m_YSize, prefix + "split_ysize", T(0.5)));
m_Params.push_back(ParamWithName<T>(true, &m_XAng, prefix + "split_xang"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_YAng, prefix + "split_yang"));
}
private:
T m_XSize;//Params.
T m_XSize;
T m_YSize;
T m_XAng;//Precalc.
T m_YAng;
@ -5701,7 +5701,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Angle, prefix + "wedge_angle", T(M_PI_2)));//Params.
m_Params.push_back(ParamWithName<T>(&m_Angle, prefix + "wedge_angle", T(M_PI_2)));
m_Params.push_back(ParamWithName<T>(&m_Hole, prefix + "wedge_hole"));
m_Params.push_back(ParamWithName<T>(&m_Count, prefix + "wedge_count", 2, eParamType::INTEGER, 1));
m_Params.push_back(ParamWithName<T>(&m_Swirl, prefix + "wedge_swirl"));
@ -5709,7 +5709,7 @@ protected:
}
private:
T m_Angle;//Params.
T m_Angle;
T m_Hole;
T m_Count;
T m_Swirl;
@ -5749,7 +5749,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string angle = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string angle = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string count = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string power = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string dist = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
@ -5790,7 +5790,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Angle, prefix + "wedge_julia_angle"));//Params.
m_Params.push_back(ParamWithName<T>(&m_Angle, prefix + "wedge_julia_angle"));
m_Params.push_back(ParamWithName<T>(&m_Count, prefix + "wedge_julia_count", 1));
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "wedge_julia_power", 1));
m_Params.push_back(ParamWithName<T>(&m_Dist, prefix + "wedge_julia_dist"));
@ -5800,7 +5800,7 @@ protected:
}
private:
T m_Angle;//Params.
T m_Angle;
T m_Count;
T m_Power;
T m_Dist;
@ -5890,7 +5890,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Count, prefix + "wedge_sph_count", 2, eParamType::INTEGER, 1));
m_Params.push_back(ParamWithName<T>(&m_Hole, prefix + "wedge_sph_hole"));
m_Params.push_back(ParamWithName<T>(&m_Swirl, prefix + "wedge_sph_swirl"));
m_Params.push_back(ParamWithName<T>(true, &m_C12Pi, prefix + "wedge_sph_c1_2pi"));
m_Params.push_back(ParamWithName<T>(true, &m_C12Pi, prefix + "wedge_sph_c1_2pi"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_CompFac, prefix + "wedge_sph_comp_fac"));
}
@ -7342,12 +7342,12 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Spread, prefix + "flux_spread"));//Params.
m_Params.push_back(ParamWithName<T>(&m_Spread, prefix + "flux_spread"));
m_Params.push_back(ParamWithName<T>(true, &m_Spr, prefix + "flux_spr"));//Precalc.
}
private:
T m_Spread;//Params.
T m_Spread;
T m_Spr;//Precalc.
};

View File

@ -116,7 +116,7 @@ protected:
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_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_ThicknessWeight, prefix + "epispiral_thickness_weight"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_HolesWeight, prefix + "epispiral_holes_weight"));
}
@ -5862,7 +5862,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(true, &m_Weight01, prefix + "bisplit_weight01"));//Precalc only.
m_Params.push_back(ParamWithName<T>(true, &m_Weight01, prefix + "bisplit_weight01"));//Precalcs only, no params.
}
private:

View File

@ -584,7 +584,7 @@ private:
*y = r * sinPhi + m_Y1;
}
T m_Radius;//Params.
T m_Radius;
T m_Radius1;
T m_Phi1;
T m_Thickness;
@ -742,7 +742,7 @@ private:
*y = r * sinPhi;
}
T m_Radius;//Params.
T m_Radius;
T m_Thickness;
T m_Contrast;
T m_Pow;
@ -907,7 +907,7 @@ private:
*y = r * sinPhi;
}
T m_Radius;//Params.
T m_Radius;
T m_Thickness;
T m_Thickness2;
T m_Contrast;
@ -1014,7 +1014,7 @@ protected:
}
private:
T m_Radius;//Params.
T m_Radius;
T m_Contrast;
T m_Pow;
T m_X;
@ -1123,7 +1123,7 @@ protected:
}
private:
T m_Radius;//Params.
T m_Radius;
T m_Thickness;
T m_Contrast;
T m_Pow;

View File

@ -1682,7 +1682,7 @@ private:
return ((n * (n * n * 15731 + 789221) + 1376312589) & 0x7fffffff) * am;
}
T m_K;//Params.
T m_K;
T m_Step;
T m_Num;
T m_XSeed;
@ -1804,7 +1804,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_XThickness, prefix + "waffle_xthickness", T(0.5)));
m_Params.push_back(ParamWithName<T>(&m_YThickness, prefix + "waffle_ythickness", T(0.5)));
m_Params.push_back(ParamWithName<T>(&m_Rotation, prefix + "waffle_rotation"));
m_Params.push_back(ParamWithName<T>(true, &m_SinR, prefix + "waffle_sinr"));
m_Params.push_back(ParamWithName<T>(true, &m_SinR, prefix + "waffle_sinr"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_CosR, prefix + "waffle_cosr"));
}
@ -2284,7 +2284,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Y, prefix + "circlecrop_y"));
m_Params.push_back(ParamWithName<T>(&m_ScatterArea, prefix + "circlecrop_scatter_area"));
m_Params.push_back(ParamWithName<T>(&m_Zero, prefix + "circlecrop_zero", 1, eParamType::INTEGER, 0, 1));
m_Params.push_back(ParamWithName<T>(true, &m_Ca, prefix + "circlecrop_ca"));
m_Params.push_back(ParamWithName<T>(true, &m_Ca, prefix + "circlecrop_ca"));//Precalc.
}
private:
@ -2392,7 +2392,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Inner, prefix + "circlecrop2_inner", T(0.5)));
m_Params.push_back(ParamWithName<T>(&m_Outer, prefix + "circlecrop2_outer", 1));
m_Params.push_back(ParamWithName<T>(&m_Zero, prefix + "circlecrop2_zero", 1, eParamType::INTEGER, 0, 1));
m_Params.push_back(ParamWithName<T>(true, &m_In, prefix + "circlecrop2_in"));
m_Params.push_back(ParamWithName<T>(true, &m_In, prefix + "circlecrop2_in"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_Out, prefix + "circlecrop2_out"));
m_Params.push_back(ParamWithName<T>(true, &m_OutWeight, prefix + "circlecrop2_out_weight"));
}
@ -2491,7 +2491,7 @@ protected:
}
private:
T m_Dist;//Params.
T m_Dist;
T m_Power;
T m_A;
T m_B;
@ -3062,7 +3062,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Sx, prefix + "curl_sp_sx"));
m_Params.push_back(ParamWithName<T>(&m_Sy, prefix + "curl_sp_sy"));
m_Params.push_back(ParamWithName<T>(&m_Dc, prefix + "curl_sp_dc"));
m_Params.push_back(ParamWithName<T>(true, &m_C2x2, prefix + "curl_sp_c2_x2"));
m_Params.push_back(ParamWithName<T>(true, &m_C2x2, prefix + "curl_sp_c2_x2"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_DcAdjust, prefix + "curl_sp_dc_adjust"));
m_Params.push_back(ParamWithName<T>(true, &m_PowerInv, prefix + "curl_sp_power_inv"));
}
@ -3191,7 +3191,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Rperiod, prefix + "heat_r_period", 1));
m_Params.push_back(ParamWithName<T>(&m_Rphase, prefix + "heat_r_phase"));
m_Params.push_back(ParamWithName<T>(&m_Ramp, prefix + "heat_r_amp"));
m_Params.push_back(ParamWithName<T>(true, &m_At, prefix + "heat_at"));
m_Params.push_back(ParamWithName<T>(true, &m_At, prefix + "heat_at"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_Bt, prefix + "heat_bt"));
m_Params.push_back(ParamWithName<T>(true, &m_Ct, prefix + "heat_ct"));
m_Params.push_back(ParamWithName<T>(true, &m_Ap, prefix + "heat_ap"));
@ -4932,7 +4932,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_CenterY, prefix + "gdoffs_center_y"));
m_Params.push_back(ParamWithName<T>(&m_Gamma, prefix + "gdoffs_gamma", 1, eParamType::INTEGER, 1, 6));
m_Params.push_back(ParamWithName<T>(&m_Square, prefix + "gdoffs_square", 0, eParamType::INTEGER, 0, 1));
m_Params.push_back(ParamWithName<T>(true, &m_Dx, prefix + "gdoffs_dx"));
m_Params.push_back(ParamWithName<T>(true, &m_Dx, prefix + "gdoffs_dx"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_Ax, prefix + "gdoffs_ax"));
m_Params.push_back(ParamWithName<T>(true, &m_Cx, prefix + "gdoffs_cx"));
m_Params.push_back(ParamWithName<T>(true, &m_Dy, prefix + "gdoffs_dyd"));
@ -4948,7 +4948,7 @@ private:
static inline T GdoffsFosc(T p, T a) { return GdoffsFscl(-1 * std::cos(p * a * M_2PI)); }
static inline T GdoffsFlip(T a, T b, T c) { return (c * (b - a) + a); }
T m_DeltaX;//Params.
T m_DeltaX;
T m_DeltaY;
T m_AreaX;
T m_AreaY;
@ -5245,7 +5245,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_D1, prefix + "trade_d1", 1, eParamType::REAL, 0, TMAX));
m_Params.push_back(ParamWithName<T>(&m_R2, prefix + "trade_r2", 1, eParamType::REAL, EPS, TMAX));
m_Params.push_back(ParamWithName<T>(&m_D2, prefix + "trade_d2", 1, eParamType::REAL, 0, TMAX));
m_Params.push_back(ParamWithName<T>(true, &m_C1, prefix + "trade_c1"));
m_Params.push_back(ParamWithName<T>(true, &m_C1, prefix + "trade_c1"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_C2, prefix + "trade_c2"));
}
@ -5326,7 +5326,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Re, prefix + "Juliac_re", 2));
m_Params.push_back(ParamWithName<T>(&m_Im, prefix + "Juliac_im", 1));
m_Params.push_back(ParamWithName<T>(&m_Dist, prefix + "Juliac_dist", 1));
m_Params.push_back(ParamWithName<T>(true, &m_HalfDist, prefix + "Juliac_half_dist"));
m_Params.push_back(ParamWithName<T>(true, &m_HalfDist, prefix + "Juliac_half_dist"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_ReInv, prefix + "Juliac_re_inv"));
m_Params.push_back(ParamWithName<T>(true, &m_OneOverReInv, prefix + "Juliac_one_over_re_inv"));
m_Params.push_back(ParamWithName<T>(true, &m_Im100, prefix + "Juliac_im100"));

View File

@ -819,7 +819,7 @@ protected:
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Xpand, prefix + "cubic3D_xpand", T(0.25)));
m_Params.push_back(ParamWithName<T>(&m_Style, prefix + "cubic3D_style"));
m_Params.push_back(ParamWithName<T>(true, &m_Fill, prefix + "cubic3D_fill")); //Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_Fill, prefix + "cubic3D_fill"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_Smooth, prefix + "cubic3D_smooth"));
m_Params.push_back(ParamWithName<T>(true, &m_SmoothStyle, prefix + "cubic3D_smooth_style"));
m_Params.push_back(ParamWithName<T>(true, &m_SmoothFill, prefix + "cubic3D_smooth_fill"));
@ -2043,7 +2043,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Y, prefix + "popcorn2_3D_y", T(0.1)));
m_Params.push_back(ParamWithName<T>(&m_Z, prefix + "popcorn2_3D_z", T(0.1)));
m_Params.push_back(ParamWithName<T>(&m_C, prefix + "popcorn2_3D_c", 3));
m_Params.push_back(ParamWithName<T>(true, &m_SinTanC, prefix + "popcorn2_3D_sintanc"));
m_Params.push_back(ParamWithName<T>(true, &m_SinTanC, prefix + "popcorn2_3D_sintanc"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_HalfWeight, prefix + "popcorn2_3D_half_weight"));
m_Params.push_back(ParamWithName<T>(true, &m_Vv, prefix + "popcorn2_3D_vv"));
}
@ -2225,7 +2225,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_XWidth, prefix + "shredlin_xwidth", T(0.5), eParamType::REAL, -1, 1));
m_Params.push_back(ParamWithName<T>(&m_YDistance, prefix + "shredlin_ydistance", 1, eParamType::REAL_NONZERO));
m_Params.push_back(ParamWithName<T>(&m_YWidth, prefix + "shredlin_ywidth", T(0.5), eParamType::REAL, -1, 1));
m_Params.push_back(ParamWithName<T>(true, &m_Xw, prefix + "shredlin_xw"));
m_Params.push_back(ParamWithName<T>(true, &m_Xw, prefix + "shredlin_xw"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_Yw, prefix + "shredlin_yw"));
m_Params.push_back(ParamWithName<T>(true, &m_1mX, prefix + "shredlin_1mx"));
m_Params.push_back(ParamWithName<T>(true, &m_1mY, prefix + "shredlin_1my"));
@ -2585,7 +2585,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Invert, prefix + "falloff_invert", 0, eParamType::INTEGER, 0, 1));
m_Params.push_back(ParamWithName<T>(&m_Type, prefix + "falloff_type", 0, eParamType::INTEGER, 0, 2));
m_Params.push_back(ParamWithName<T>(&m_BoxPow, prefix + "falloff_boxpow", 2, eParamType::INTEGER, 2, 32));//Original defaulted this to 0 which directly contradicts the specified range of 2-32.
m_Params.push_back(ParamWithName<T>(true, &m_InternalScatter, prefix + "falloff_internal_scatter"));
m_Params.push_back(ParamWithName<T>(true, &m_InternalScatter, prefix + "falloff_internal_scatter"));//Precalc.
}
private:
@ -3625,7 +3625,7 @@ public:
//Creating Z factors relative to the planes. These will be added, whereas x and y will be assigned.
//Original does += z *, so using z on the right side of = is intentional.
if (m_MajPlane == 2)
//Boost is the separation distance between the two planes.
//Boost is the separation distance between the two planes.
helper.Out.z = helper.In.z * T(0.5) * m_ZLift + (posNeg * m_Boost);
else
helper.Out.z = helper.In.z * T(0.5) * m_ZLift;

View File

@ -1752,7 +1752,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Blur, prefix + "crob_blur", 1, eParamType::INTEGER));
m_Params.push_back(ParamWithName<T>(&m_RatioBlur, prefix + "crob_ratioBlur", T(0.5), eParamType::REAL, 0, 1));
m_Params.push_back(ParamWithName<T>(&m_DirectBlur, prefix + "crob_directBlur", 2));
m_Params.push_back(ParamWithName<T>(true, &m_XInterval, prefix + "crob_xinterval"));
m_Params.push_back(ParamWithName<T>(true, &m_XInterval, prefix + "crob_xinterval"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_YInterval, prefix + "crob_yinterval"));
m_Params.push_back(ParamWithName<T>(true, &m_XInt2, prefix + "crob_xint2"));
m_Params.push_back(ParamWithName<T>(true, &m_YInt2, prefix + "crob_yint2"));
@ -3889,7 +3889,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Distort, prefix + "crackle_distort"));
m_Params.push_back(ParamWithName<T>(&m_Scale, prefix + "crackle_scale", 1));
m_Params.push_back(ParamWithName<T>(&m_Z, prefix + "crackle_z"));
m_Params.push_back(ParamWithName<T>(true, &m_HalfCellSize, prefix + "crackle_half_cellsize"));
m_Params.push_back(ParamWithName<T>(true, &m_HalfCellSize, prefix + "crackle_half_cellsize"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &(m_C[0][0].x), prefix + "crackle_cache", sizeof(m_C)));
}
@ -4028,7 +4028,7 @@ protected:
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Cellsize, prefix + "crackle2_cellsize", 1, eParamType::REAL, T(0.0001)));
m_Params.push_back(ParamWithName<T>(true, &m_OneOverCellsize, prefix + "crackle2_one_over_cellsize"));
m_Params.push_back(ParamWithName<T>(true, &m_OneOverCellsize, prefix + "crackle2_one_over_cellsize"));//Precalc.
}
private:
@ -4876,7 +4876,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_SuperN1, prefix + "w_super_n1", 1));
m_Params.push_back(ParamWithName<T>(&m_SuperN2, prefix + "w_super_n2", 1));
m_Params.push_back(ParamWithName<T>(&m_SuperN3, prefix + "w_super_n3", 1));
m_Params.push_back(ParamWithName<T>(true, &m_InvLituusA, prefix + "w_inv_lituus_a"));//Precalc
m_Params.push_back(ParamWithName<T>(true, &m_InvLituusA, prefix + "w_inv_lituus_a"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_TanStarSlope, prefix + "w_tan_star_slope"));
m_Params.push_back(ParamWithName<T>(true, &m_HypergonD, prefix + "w_hypergon_d"));
m_Params.push_back(ParamWithName<T>(true, &m_SuperM4th, prefix + "w_super_m_4th"));
@ -5076,7 +5076,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_SuperN1, prefix + "x_super_n1", 1));
m_Params.push_back(ParamWithName<T>(&m_SuperN2, prefix + "x_super_n2", 1));
m_Params.push_back(ParamWithName<T>(&m_SuperN3, prefix + "x_super_n3", 1));
m_Params.push_back(ParamWithName<T>(true, &m_InvLituusA, prefix + "x_inv_lituus_a"));//Precalc
m_Params.push_back(ParamWithName<T>(true, &m_InvLituusA, prefix + "x_inv_lituus_a"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_TanStarSlope, prefix + "x_tan_star_slope"));
m_Params.push_back(ParamWithName<T>(true, &m_HypergonD, prefix + "x_hypergon_d"));
m_Params.push_back(ParamWithName<T>(true, &m_SuperM4th, prefix + "x_super_m_4th"));
@ -5276,7 +5276,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_SuperN1, prefix + "y_super_n1", 1));
m_Params.push_back(ParamWithName<T>(&m_SuperN2, prefix + "y_super_n2", 1));
m_Params.push_back(ParamWithName<T>(&m_SuperN3, prefix + "y_super_n3", 1));
m_Params.push_back(ParamWithName<T>(true, &m_InvLituusA, prefix + "y_inv_lituus_a"));//Precalc
m_Params.push_back(ParamWithName<T>(true, &m_InvLituusA, prefix + "y_inv_lituus_a"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_TanStarSlope, prefix + "y_tan_star_slope"));
m_Params.push_back(ParamWithName<T>(true, &m_HypergonD, prefix + "y_hypergon_d"));
m_Params.push_back(ParamWithName<T>(true, &m_SuperM4th, prefix + "y_super_m_4th"));
@ -5477,7 +5477,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_SuperN1, prefix + "z_super_n1", 1));
m_Params.push_back(ParamWithName<T>(&m_SuperN2, prefix + "z_super_n2", 1));
m_Params.push_back(ParamWithName<T>(&m_SuperN3, prefix + "z_super_n3", 1));
m_Params.push_back(ParamWithName<T>(true, &m_InvLituusA, prefix + "z_inv_lituus_a"));//Precalc
m_Params.push_back(ParamWithName<T>(true, &m_InvLituusA, prefix + "z_inv_lituus_a"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_TanStarSlope, prefix + "z_tan_star_slope"));
m_Params.push_back(ParamWithName<T>(true, &m_HypergonD, prefix + "z_hypergon_d"));
m_Params.push_back(ParamWithName<T>(true, &m_SuperM4th, prefix + "z_super_m_4th"));

View File

@ -821,7 +821,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_F, prefix + "pRose3D_f", 3));
m_Params.push_back(ParamWithName<T>(&m_Wigsc, prefix + "pRose3D_wigsc"));
m_Params.push_back(ParamWithName<T>(&m_Offset, prefix + "pRose3D_offset"));
m_Params.push_back(ParamWithName<T>(true, &m_Cycle, prefix + "pRose3D_cycle"));
m_Params.push_back(ParamWithName<T>(true, &m_Cycle, prefix + "pRose3D_cycle"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_OptDir, prefix + "pRose3D_opt_dir"));
m_Params.push_back(ParamWithName<T>(true, &m_PetalsSign, prefix + "pRose3D_petals_sign"));
m_Params.push_back(ParamWithName<T>(true, &m_NumPetals, prefix + "pRose3D_num_petals"));
@ -954,7 +954,7 @@ protected:
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Base, prefix + "log_db_base", 1));
m_Params.push_back(ParamWithName<T>(&m_FixPeriod, prefix + "log_db_fix_period", 1));
m_Params.push_back(ParamWithName<T>(true, &m_Denom, prefix + "log_db_denom"));
m_Params.push_back(ParamWithName<T>(true, &m_Denom, prefix + "log_db_denom"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_FixPe, prefix + "log_db_fix_pe"));
}
private:
@ -4486,7 +4486,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Freq2, prefix + "vibration_freq2", 1));
m_Params.push_back(ParamWithName<T>(&m_Amp2, prefix + "vibration_amp2", T(0.25)));
m_Params.push_back(ParamWithName<T>(&m_Phase2, prefix + "vibration_phase2", 0, eParamType::REAL_CYCLIC, 0, 1));
m_Params.push_back(ParamWithName<T>(true, &m_CosDir, prefix + "vibration_cos_dir"));
m_Params.push_back(ParamWithName<T>(true, &m_CosDir, prefix + "vibration_cos_dir"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_SinDir, prefix + "vibration_sin_dir"));
m_Params.push_back(ParamWithName<T>(true, &m_CosTot, prefix + "vibration_cos_tot"));
m_Params.push_back(ParamWithName<T>(true, &m_SinTot, prefix + "vibration_sin_tot"));
@ -4701,7 +4701,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_F2mfreq, prefix + "vibration2_fmfreq2"));
m_Params.push_back(ParamWithName<T>(&m_A2m , prefix + "vibration2_am2"));
m_Params.push_back(ParamWithName<T>(&m_A2mfreq, prefix + "vibration2_amfreq2"));
m_Params.push_back(ParamWithName<T>(true, &m_CosDir, prefix + "vibration2_cos_dir"));
m_Params.push_back(ParamWithName<T>(true, &m_CosDir, prefix + "vibration2_cos_dir"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_SinDir, prefix + "vibration2_sin_dir"));
m_Params.push_back(ParamWithName<T>(true, &m_ScaledFreq, prefix + "vibration2_scaled_freq"));
m_Params.push_back(ParamWithName<T>(true, &m_PhaseShift, prefix + "vibration2_phase_shift"));
@ -5202,8 +5202,8 @@ public:
T z_scaled = z * std::sqrt(rand.Frand01<T>()) * T(1.1547005383792515290182975610039);//2 / sqrt(3)
T n = VarFuncs<T>::HashShadertoy(xfinal, yfinal, m_Seed);
T R = m_SizeOver2 * z_scaled * std::pow(n, m_Power);
helper.Out.x = std::cos(final_angle) * R + xfinal * m_Weight;
helper.Out.y = std::sin(final_angle) * R + yfinal * m_Weight;
helper.Out.x = (std::cos(final_angle) * R + xfinal) * m_Weight;
helper.Out.y = (std::sin(final_angle) * R + yfinal) * m_Weight;
}
helper.Out.z = DefaultZ(helper);
@ -5270,7 +5270,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "hex_rand_power", 1));
m_Params.push_back(ParamWithName<T>(&m_Density, prefix + "hex_rand_density", 1, eParamType::REAL, 0, 1));
m_Params.push_back(ParamWithName<T>(&m_Seed, prefix + "hex_rand_seed", 1));
m_Params.push_back(ParamWithName<T>(true, &m_SizeOver2, prefix + "hex_rand_size_over_2"));
m_Params.push_back(ParamWithName<T>(true, &m_SizeOver2, prefix + "hex_rand_size_over_2"));//Precalc.
}
private:
@ -5884,7 +5884,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_SinYAmp, prefix + "unicorngaloshen_sin_y_amplitude", 2));
m_Params.push_back(ParamWithName<T>(&m_SinYFreq, prefix + "unicorngaloshen_sin_y_freq", T(0.2)));
m_Params.push_back(ParamWithName<T>(&m_Mode, prefix + "unicorngaloshen_mode", 0, eParamType::INTEGER, 0, 4));
m_Params.push_back(ParamWithName<T>(true, &m_SinXFreqPi, prefix + "unicorngaloshen_sin_x_freq_pi"));
m_Params.push_back(ParamWithName<T>(true, &m_SinXFreqPi, prefix + "unicorngaloshen_sin_x_freq_pi"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_SinYFreqPi, prefix + "unicorngaloshen_sin_y_freq_pi"));
}
@ -7461,7 +7461,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Scaley, prefix + "waves23_scaley", T(0.05)));
m_Params.push_back(ParamWithName<T>(&m_Freqx, prefix + "waves23_freqx", T(7.0)));
m_Params.push_back(ParamWithName<T>(&m_Freqy, prefix + "waves23_freqy", T(13.0)));
m_Params.push_back(ParamWithName<T>(true, &m_Freqx12Pi, prefix + "waves23_freqx_12pi"));
m_Params.push_back(ParamWithName<T>(true, &m_Freqx12Pi, prefix + "waves23_freqx_12pi"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_Freqy12Pi, prefix + "waves23_freqy_12pi"));
}

View File

@ -311,7 +311,124 @@ private:
T m_WeightPrecalc;
};
/// <summary>
/// Circle_Rand.
/// A new version of CircleRand from Chaotica by tatasz.
/// </summary>
template <typename T>
class Circle_RandVariation : public ParametricVariation<T>
{
public:
Circle_RandVariation(T weight = 1.0) : ParametricVariation<T>("Circle_Rand", eVariationId::VAR_CIRCLE_RAND, weight)
{
Init();
}
PARVARCOPY(Circle_RandVariation)
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
T a = rand.Frand01<T>() * M_2PI;
T r = std::sqrt(rand.Frand01<T>());
T x = 2 * (Floor(rand.Frand01<T>() * m_SideX * 2 + T(0.5)) - m_SideX);
T y = 2 * (Floor(rand.Frand01<T>() * m_SideY * 2 + T(0.5)) - m_SideY);
T ret;
if (VarFuncs<T>::HashShadertoy(y, x, m_Seed) < m_Dens)
ret = m_Size * r * std::exp(std::log(VarFuncs<T>::HashShadertoy(x, y, m_Seed)) * m_Power);
else
ret = 0;
if (ret > 0)
{
helper.Out.x = m_Weight * (std::cos(a) * ret + x);
helper.Out.y = m_Weight * (std::sin(a) * ret + y);
}
helper.Out.z = DefaultZ(helper);
}
virtual string OpenCLString() const override
{
ostringstream ss, ss2;
intmax_t i = 0;
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string x = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string y = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string size = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string power = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string density = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string seed = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string sidex = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string sidey = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
ss << "\t{\n"
<< "\t\treal_t seed = " << seed << ";\n"
<< "\t\treal_t sidex = " << sidex << ";\n"
<< "\t\treal_t sidey = " << sidey << ";\n"
<< "\t\treal_t a = MwcNext01(mwc) * M_2PI;\n"
<< "\t\treal_t r = sqrt(MwcNext01(mwc));\n"
<< "\t\treal_t x = 2 * (floor(MwcNext01(mwc) * sidex * 2 + (real_t)(0.5)) - sidex);\n"
<< "\t\treal_t y = 2 * (floor(MwcNext01(mwc) * sidey * 2 + (real_t)(0.5)) - sidey);\n"
<< "\n"
<< "\t\treal_t ret;\n"
<< "\n"
<< "\t\tif (HashShadertoy(y, x, seed) < " << density << ")\n"
<< "\t\t ret = " << size << " * r * exp(log(HashShadertoy(x, y, seed)) * " << power << ");\n"
<< "\t\telse"
<< "\t\t ret = (real_t)(0.0);"
<< "\n"
<< "\t\tif (ret > (real_t)(0.0))\n"
<< "\t\t{"
<< "\t\t vOut.x = " << weight << " * fma((real_t)(cos(a)), ret, x);\n"
<< "\t\t vOut.y = " << weight << " * fma((real_t)(sin(a)), ret, y);\n"
<< "\t\t}"
<< "\n"
<< "\t\tvOut.z = " << DefaultZCl()
<< "\t}\n";
return ss.str();
}
virtual vector<string> OpenCLGlobalFuncNames() const override
{
return vector<string> { "Fract", "HashShadertoy" };
}
virtual void Precalc() override
{
m_SideX = m_X * T(0.5);
m_SideY = m_Y * T(0.5);
}
protected:
void Init()
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "Circle_Rand_X", 10));
m_Params.push_back(ParamWithName<T>(&m_Y, prefix + "Circle_Rand_Y", 10));
m_Params.push_back(ParamWithName<T>(&m_Size, prefix + "Circle_Rand_size", 1, eParamType::REAL, 0));
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "Circle_Rand_power", 1));
m_Params.push_back(ParamWithName<T>(&m_Dens, prefix + "Circle_Rand_density", 1, eParamType::REAL, 0, 1));
m_Params.push_back(ParamWithName<T>(&m_Seed, prefix + "Circle_Rand_seed", 1, eParamType::REAL));
m_Params.push_back(ParamWithName<T>(true, &m_SideX, prefix + "Circle_Rand_side_x"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_SideY, prefix + "Circle_Rand_side_y"));
}
private:
T m_X;
T m_Y;
T m_Size;
T m_Power;
T m_Dens;
T m_Seed;
T m_SideX;//Precalc.
T m_SideY;
};
MAKEPREPOSTPARVAR(Gnarly, gnarly, GNARLY)
MAKEPREPOSTPARVAR(Inkdrop, inkdrop, INKDROP)
MAKEPREPOSTPARVAR(HexModulus, hex_modulus, HEX_MODULUS)
MAKEPREPOSTPARVAR(Circle_Rand, circle_rand, CIRCLE_RAND)
}

View File

@ -52,7 +52,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string scale = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string scale = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string centerX = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string centerY = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string bdcs = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Precalc.
@ -104,14 +104,14 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_CenterX, prefix + "dc_bubble_centerx"));//Params.
m_Params.push_back(ParamWithName<T>(&m_CenterX, prefix + "dc_bubble_centerx"));
m_Params.push_back(ParamWithName<T>(&m_CenterY, prefix + "dc_bubble_centery"));
m_Params.push_back(ParamWithName<T>(&m_Scale, prefix + "dc_bubble_scale", 1));
m_Params.push_back(ParamWithName<T>(true, &m_Bdcs, prefix + "dc_bubble_bdcs"));//Precalc.
}
private:
T m_CenterX;//Params.
T m_CenterX;
T m_CenterY;
T m_Scale;
T m_Bdcs;//Precalc.
@ -152,7 +152,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string origin = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string origin = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string h = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Precalc.
ss << "\t{\n"
<< "\t\tint x0 = (MwcNext(mwc) & 1) ? -1 : 1;\n"
@ -180,12 +180,12 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Origin, prefix + "dc_carpet_origin"));//Params.
m_Params.push_back(ParamWithName<T>(&m_Origin, prefix + "dc_carpet_origin"));
m_Params.push_back(ParamWithName<T>(true, &m_H, prefix + "dc_carpet_h"));//Precalc.
}
private:
T m_Origin;//Params.
T m_Origin;
T m_H;//Precalc.
};
@ -263,7 +263,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string cubeC1 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string cubeC1 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string cubeC2 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string cubeC3 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string cubeC4 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
@ -345,7 +345,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_DcCubeC1, prefix + "dc_cube_c1"));//Params.
m_Params.push_back(ParamWithName<T>(&m_DcCubeC1, prefix + "dc_cube_c1"));
m_Params.push_back(ParamWithName<T>(&m_DcCubeC2, prefix + "dc_cube_c2"));
m_Params.push_back(ParamWithName<T>(&m_DcCubeC3, prefix + "dc_cube_c3"));
m_Params.push_back(ParamWithName<T>(&m_DcCubeC4, prefix + "dc_cube_c4"));
@ -363,7 +363,7 @@ protected:
}
private:
T m_DcCubeC1;//Params.
T m_DcCubeC1;
T m_DcCubeC2;
T m_DcCubeC3;
T m_DcCubeC4;
@ -429,7 +429,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string offset = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string offset = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string angle = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string scale = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string x = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
@ -484,7 +484,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Offset, prefix + "dc_cylinder_offset"));//Params.
m_Params.push_back(ParamWithName<T>(&m_Offset, prefix + "dc_cylinder_offset"));
m_Params.push_back(ParamWithName<T>(&m_Angle, prefix + "dc_cylinder_angle"));//Original used a prefix of dc_cyl_, which is incompatible with Ember's design.
m_Params.push_back(ParamWithName<T>(&m_Scale, prefix + "dc_cylinder_scale", T(0.5)));
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "dc_cylinder_x", T(0.125)));//Original used a prefix of cyl_, which is incompatible with Ember's design.
@ -497,7 +497,7 @@ protected:
}
private:
T m_Offset;//Params.
T m_Offset;
T m_Angle;
T m_Scale;
T m_X;
@ -730,7 +730,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string offset = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string offset = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string angle = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string scale = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string ldcs = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Precalc.
@ -778,7 +778,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_Offset, prefix + "dc_linear_offset"));//Params.
m_Params.push_back(ParamWithName<T>(&m_Offset, prefix + "dc_linear_offset"));
m_Params.push_back(ParamWithName<T>(&m_Angle, prefix + "dc_linear_angle"));
m_Params.push_back(ParamWithName<T>(&m_Scale, prefix + "dc_linear_scale", 1));
m_Params.push_back(ParamWithName<T>(true, &m_Ldcs, prefix + "dc_linear_ldcs"));//Precalc.
@ -788,7 +788,7 @@ protected:
}
private:
T m_Offset;//Params.
T m_Offset;
T m_Angle;
T m_Scale;
T m_Ldcs;//Precalc.
@ -901,7 +901,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string scatterArea = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string scatterArea = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string zeroEdges = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string a = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Precalc.
ss << "\t{\n"
@ -994,13 +994,13 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_ScatterArea, prefix + "dc_triangle_scatter_area", 0, eParamType::REAL, -1, 1));//Params.
m_Params.push_back(ParamWithName<T>(&m_ScatterArea, prefix + "dc_triangle_scatter_area", 0, eParamType::REAL, -1, 1));
m_Params.push_back(ParamWithName<T>(&m_ZeroEdges, prefix + "dc_triangle_zero_edges", 0, eParamType::INTEGER, 0, 1));
m_Params.push_back(ParamWithName<T>(true, &m_A, prefix + "dc_triangle_a"));//Precalc.
}
private:
T m_ScatterArea;//Params.
T m_ScatterArea;
T m_ZeroEdges;
T m_A;//Precalc.
};
@ -1044,7 +1044,7 @@ public:
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string weight = WeightDefineString();
string x0 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Params.
string x0 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string x1 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string factor = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
string overwrite = "parVars[" + ToUpper(m_Params[i++].Name()) + index;//Precalc.
@ -1081,7 +1081,7 @@ protected:
{
string prefix = Prefix();
m_Params.clear();
m_Params.push_back(ParamWithName<T>(&m_X0, prefix + "dc_ztransl_x0", 0, eParamType::REAL, 0, 1));//Params.
m_Params.push_back(ParamWithName<T>(&m_X0, prefix + "dc_ztransl_x0", 0, eParamType::REAL, 0, 1));
m_Params.push_back(ParamWithName<T>(&m_X1, prefix + "dc_ztransl_x1", 1, eParamType::REAL, 0, 1));
m_Params.push_back(ParamWithName<T>(&m_Factor, prefix + "dc_ztransl_factor", 1));
m_Params.push_back(ParamWithName<T>(&m_Overwrite, prefix + "dc_ztransl_overwrite", 1, eParamType::INTEGER, 0, 1));
@ -1092,7 +1092,7 @@ protected:
}
private:
T m_X0;//Params.
T m_X0;
T m_X1;
T m_Factor;
T m_Overwrite;
@ -1426,7 +1426,7 @@ protected:
string prefix = Prefix();
m_Params.clear();
m_Params.reserve(15);
m_Params.push_back(ParamWithName<T>(&m_Shape, prefix + "dc_perlin_shape", 0, eParamType::INTEGER, 0, 2));//Params.
m_Params.push_back(ParamWithName<T>(&m_Shape, prefix + "dc_perlin_shape", 0, eParamType::INTEGER, 0, 2));
m_Params.push_back(ParamWithName<T>(&m_Map, prefix + "dc_perlin_map", 0, eParamType::INTEGER, 0, 5));
m_Params.push_back(ParamWithName<T>(&m_SelectCentre, prefix + "dc_perlin_select_centre", 0, eParamType::REAL, -1, 1));
m_Params.push_back(ParamWithName<T>(&m_SelectRange, prefix + "dc_perlin_select_range", 1, eParamType::REAL, T(0.1), 2));
@ -1439,11 +1439,11 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Freqs, prefix + "dc_perlin_freqs", 2));
m_Params.push_back(ParamWithName<T>(&m_Z, prefix + "dc_perlin_z"));
m_Params.push_back(ParamWithName<T>(&m_SelectBailout, prefix + "dc_perlin_select_bailout", 10, eParamType::INTEGER, 2, 1000));
m_Params.push_back(ParamWithName<T>(true, &m_NotchBottom, prefix + "dc_perlin_notch_bottom"));
m_Params.push_back(ParamWithName<T>(true, &m_NotchBottom, prefix + "dc_perlin_notch_bottom"));//Precalc.
m_Params.push_back(ParamWithName<T>(true, &m_NotchTop, prefix + "dc_perlin_notch_top"));
}
private:
T m_Shape;//Params.
T m_Shape;
T m_Map;
T m_SelectCentre;
T m_SelectRange;
@ -1636,7 +1636,7 @@ protected:
m_Params.push_back(ParamWithName<T>(&m_Width, prefix + "pixel_flow_width", 200));
m_Params.push_back(ParamWithName<T>(&m_Seed, prefix + "pixel_flow_seed", 42, eParamType::INTEGER));
m_Params.push_back(ParamWithName<T>(&m_EnableDC, prefix + "pixel_flow_enable_dc", 0, eParamType::INTEGER, 0, 1));
m_Params.push_back(ParamWithName<T>(true, &m_Rad, prefix + "pixel_flow_rad"));
m_Params.push_back(ParamWithName<T>(true, &m_Rad, prefix + "pixel_flow_rad"));//Precalc.
}
private:

View File

@ -884,7 +884,7 @@ bool XmlToEmber<T>::ParseEmberElementFromChaos(xmlNode* emberNode, Ember<T>& cur
xmlAttrPtr att;
currentEmber.m_Palette.Clear();//Wipe out the current palette.
att = emberNode->properties;//The top level element is a ember element, read the attributes of it and store them.
auto variationsfunc = [&](const string & prefix, const char* nodename, xmlNode * node, Xform<T>& xf, std::vector<std::string>& alliterweights)
auto variationsfunc = [&](const string& prefix, const char* nodename, xmlNode * node, Xform<T>& xf, std::vector<std::string>& alliterweights)
{
if (const auto transformsChildNode = GetChildNode(node, nodename))
{
@ -1352,7 +1352,7 @@ bool XmlToEmber<T>::ParseEmberElementFromChaos(xmlNode* emberNode, Ember<T>& cur
{
if (camChildNode->type == XML_ELEMENT_NODE)
{
if (ParseAndAssignContent(camChildNode, "name", "rotate", currentEmber.m_Rotate)) { currentEmber.m_Rotate = NormalizeDeg180<T>(currentEmber.m_Rotate); }
if (ParseAndAssignContent(camChildNode, "name", "rotate", currentEmber.m_Rotate)) { currentEmber.m_Rotate = NormalizeDeg360<T>(currentEmber.m_Rotate); }
else if (ParseAndAssignContent(camChildNode, "name", "sensor_width", sensorWidth)) { }
else if (ParseAndAssignContent(camChildNode, "name", "pos", pos))
{
@ -1441,7 +1441,7 @@ bool XmlToEmber<T>::ParseEmberElementFromChaos(xmlNode* emberNode, Ember<T>& cur
valv = CCX(valvalsnode->children->content);
}
auto parsehsvfunc = [&](const std::string & knots, const std::string & vals, vector<v2F>& vec)
auto parsehsvfunc = [&](const std::string& knots, const std::string& vals, vector<v2F>& vec)
{
istringstream kstr(knots);
istringstream vstr(vals);
@ -1563,7 +1563,7 @@ bool XmlToEmber<T>::ParseEmberElement(xmlNode* emberNode, Ember<T>& currentEmber
//First parse out simple float reads.
if (ParseAndAssign(curAtt->name, attStr, "time", currentEmber.m_Time, ret)) {}
else if (ParseAndAssign(curAtt->name, attStr, "scale", currentEmber.m_PixelsPerUnit, ret)) { currentEmber.m_OrigPixPerUnit = currentEmber.m_PixelsPerUnit; }
else if (ParseAndAssign(curAtt->name, attStr, "rotate", currentEmber.m_Rotate, ret)) { currentEmber.m_Rotate = NormalizeDeg180<T>(currentEmber.m_Rotate); }
else if (ParseAndAssign(curAtt->name, attStr, "rotate", currentEmber.m_Rotate, ret)) { currentEmber.m_Rotate = NormalizeDeg360<T>(currentEmber.m_Rotate); }
else if (ParseAndAssign(curAtt->name, attStr, "zoom", currentEmber.m_Zoom, ret)) { ClampGteRef<T>(currentEmber.m_Zoom, 0); }
else if (ParseAndAssign(curAtt->name, attStr, "cam_zoom", currentEmber.m_Zoom, ret)) { ClampGteRef<T>(currentEmber.m_Zoom, 0); }//JWildfire uses cam_zoom.
else if (ParseAndAssign(curAtt->name, attStr, "filter", currentEmber.m_SpatialFilterRadius, ret)) {}