1/** 2 * Mandelbulber v2, a 3D fractal generator _%}}i*<. ____ _______ 3 * Copyright (C) 2020 Mandelbulber Team _>]|=||i=i<, / __ \___ ___ ___ / ___/ / 4 * \><||i|=>>%) / /_/ / _ \/ -_) _ \/ /__/ /__ 5 * This file is part of Mandelbulber. )<=i=]=|=i<> \____/ .__/\__/_//_/\___/____/ 6 * The project is licensed under GPLv3, -<>>=|><|||` /_/ 7 * see also COPYING file in this folder. ~+{i%+++ 8 * 9 * TransfDifsSphereIteration fragmentarium code, mdifs by knighty (jan 2012) 10 11 * This file has been autogenerated by tools/populateUiInformation.php 12 * from the file "fractal_transf_difs_sphere.cpp" in the folder formula/definition 13 * D O N O T E D I T T H I S F I L E ! 14 */ 15 16REAL4 TransfDIFSSphereIteration(REAL4 z, __constant sFractalCl *fractal, sExtendedAuxCl *aux) 17{ 18 REAL4 zc = z; 19 REAL vecLen; 20 if (!fractal->transformCommon.functionEnabled4dFalse) 21 { 22 REAL3 vec = (REAL3){zc.x, zc.y, zc.z}; 23 vecLen = length(vec); 24 } 25 else 26 vecLen = length(zc); 27 28 REAL spD = vecLen - fractal->transformCommon.offsetR1; 29 aux->dist = min(aux->dist, spD / (aux->DE + 1.0f)); 30 aux->DE0 = spD; // temp testing 31 return z; 32}