diff --git a/Data/Version History.txt b/Data/Version History.txt index 9d14cac..54c4506 100644 --- a/Data/Version History.txt +++ b/Data/Version History.txt @@ -11,7 +11,9 @@ -Preserve prefix and suffix fields between open/close of the Final Render dialog. -Entering xaos cells will always select the entire cell to make editing easier. -Allow right mouse drag + shift perform panning the same way middle mouse button drag does, for users without middle mouse buttons. - + -Miscellaneous OpenCL optimizations. + -Change Blur Curve math to be centered on 0,0 and create a more dramatic effect at lower values. + --Bug fixes -Fix crash on palette editor when opening it with certain palette files in a particular order. -An xform with only a post variation in it might have rendered wrong. @@ -20,11 +22,15 @@ -Custom palettes were not being read correctly on non ANSI machines. -EmberAnimate.exe was using 1-based indexing for filenames, but Fractorium and all of the documentation was using 0-based indexing. Make all use 0-based indexing. -The left header column in the xaos visualization table had somehow disappeared. + -Fix OpenCL compilation bug when using Depth Blur with AMD on Mac. --Code changes -Make all iterators on the CPU use a temporary point. -DoubleSpinBox now has a boolean which specifies whether it clears its selection on enter. Default true. -Make AddXformsWithXaos() be a static member of FractoriumEmberController for quicker build times. + -Remove the unused field m_RotCenterY from Ember. + -Make a #define for fma() testing, but seems to make no difference. + -Optimize some of the OpenCL iteration kernel generation code. 1.0.0.18 1/31/2020 --User changes diff --git a/Source/EmberCL/IterOpenCLKernelCreator.cpp b/Source/EmberCL/IterOpenCLKernelCreator.cpp index 5c238eb..c8def0d 100644 --- a/Source/EmberCL/IterOpenCLKernelCreator.cpp +++ b/Source/EmberCL/IterOpenCLKernelCreator.cpp @@ -1196,10 +1196,10 @@ string IterOpenCLKernelCreator::CreateProjectionString(const Ember& ember) " z = fma(ember->m_C02, secondPoint.m_X, fma(ember->m_C12, secondPoint.m_Y, ember->m_C22 * z));\n" "\n" " real_t zr = Zeps(1 - ember->m_CamPerspective * z);\n" - " real_t prcx = (x - carToRas->m_CarCenterX) / carToRas->m_CarHalfX;\n" - " real_t prcy = (y - carToRas->m_CarCenterY) / carToRas->m_CarHalfY;\n" + " real_t prcx = x / carToRas->m_CarHalfX;\n" + " real_t prcy = y / carToRas->m_CarHalfY;\n" " real_t dist = sqrt(SQR(prcx) + SQR(prcy)) * (real_t)(10.0);\n" - " real_t scale = ember->m_BlurCurve != (real_t)(0.0) ? min((real_t)(1.0), (dist * dist) / (4 * ember->m_BlurCurve)) : (real_t)(1.0);\n" + " real_t scale = ember->m_BlurCurve != (real_t)(0.0) ? (SQR(dist) / (4 * ember->m_BlurCurve)) : (real_t)(1.0);\n" " real_t dr = MwcNext01(&mwc) * (ember->m_BlurCoef * scale) * z;\n" "\n" " dsin = sin(t);\n" @@ -1224,10 +1224,10 @@ string IterOpenCLKernelCreator::CreateProjectionString(const Ember& ember) " dsin = sin(t);\n" " dcos = cos(t);\n" "\n" - " real_t prcx = (secondPoint.m_X - carToRas->m_CarCenterX) / carToRas->m_CarHalfX;\n" - " real_t prcy = (y - carToRas->m_CarCenterY) / carToRas->m_CarHalfY;\n" + " real_t prcx = secondPoint.m_X / carToRas->m_CarHalfX;\n" + " real_t prcy = y / carToRas->m_CarHalfY;\n" " real_t dist = sqrt(SQR(prcx) + SQR(prcy)) * (real_t)(10.0);\n" - " real_t scale = ember->m_BlurCurve != (real_t)(0.0) ? min((real_t)(1.0), (dist * dist) / (4 * ember->m_BlurCurve)) : (real_t)(1.0);\n" + " real_t scale = ember->m_BlurCurve != (real_t)(0.0) ? (SQR(dist) / (4 * ember->m_BlurCurve)) : (real_t)(1.0);\n" " real_t dr = MwcNext01(&mwc) * (ember->m_BlurCoef * scale) * z;\n" "\n" " secondPoint.m_X = fma(dr, dcos, secondPoint.m_X) / zr;\n"