/**
 * Mandelbulber v2, a 3D fractal generator  _%}}i*<.        ____                _______
 * Copyright (C) 2019 Mandelbulber Team   _>]|=||i=i<,     / __ \___  ___ ___  / ___/ /
 *                                        \><||i|=>>%)    / /_/ / _ \/ -_) _ \/ /__/ /__
 * This file is part of Mandelbulber.     )<=i=]=|=i<>    \____/ .__/\__/_//_/\___/____/
 * The project is licensed under GPLv3,   -<>>=|><|||`        /_/
 * see also COPYING file in this folder.    ~+{i%+++
 *
 * scale 3d. Scale each axis individually

 * This file has been autogenerated by tools/populateUiInformation.php
 * from the function "TransfScale3dIteration" in the file fractal_formulas.cpp
 * D O    N O T    E D I T    T H I S    F I L E !
 */

REAL4 TransfScale3dIteration(REAL4 z, __constant sFractalCl *fractal, sExtendedAuxCl *aux)
{
	z *= fractal->transformCommon.scale3D111;

	if (!fractal->analyticDE.enabledFalse)
		aux->DE = aux->DE * native_divide(length(z), aux->r) + 1.0f;
	else
		aux->DE = aux->DE * native_divide(length(z), aux->r) * fractal->analyticDE.scale1
							+ fractal->analyticDE.offset1;
	return z;
}