A minimal C++ + OpenCL renderer for Ultra Fractal .upr parameter files.
.upr scenes, including external .ufm/.ucl/.uxf formula references and base64+zlib-compressed parameter blocks.@#TIME[CURVE]VAL keyframes and renders single frames or PNG sequences.Pre-rendered with mf -sl 6 on an RTX 4090. UPRs ship in tests/UF_params/.
basic_mb
mb_zoom_rotation
composite_2layer
mb_exp_smoothinggit clone https://github.com/your-org/MegaFractal && cd MegaFractal
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
build/mf tests/UF_params/basic_mb/basic_mb.upr out.png -sl 4
build/mf_gui # interactive preview
Most demo scenes pull in third-party formulas from the public UF formula database plus UF’s bundled Standard.{ucl,ufm,uxf}. Run one of these once to populate UF_formulas/:
python scripts/fetch_formulas.py # any OS
powershell -ExecutionPolicy Bypass -File scripts\fetch_formulas.ps1 # Windows, no Python
Both copy the bundled Standard stubs that ship in scripts/standard_stub/ and download ~77 third-party files. Pass --force (or -Force) to overwrite. The Windows distribution zip ships both scripts.
UPRs can store keyframe chains. MegaFractal interpolates and renders any frame:
build/mf scene.upr out.png -frame 30
build/mf scene.upr out.png --frames 1:240
ffmpeg -framerate 30 -i out_%04d.png -pix_fmt yuv420p out.mp4
Six files do everything. parser.cpp reads UPRs and resolves external formula references. translator.cpp turns UF formulas into OpenCL C with two-pass type inference. kernel_gen.cpp assembles a complete scene kernel — per-AA-sample compositor, 18 blend modes, gradient LUT, imaging kernel. renderer.cpp picks a device, probes for a TDR-safe tile size, and drives progressive accumulation. anim.cpp evaluates animation keyframes. main.cpp wires it together.
The test corpus is adapted from baeldin/uf2opencl.