From 2e116ba47b5725cbedd126ddbb46e6673e336123 Mon Sep 17 00:00:00 2001 From: supersurviveur Date: Mon, 28 Sep 2026 10:44:06 +0200 Subject: [PATCH] feat: add AA in headless exports --- CLAUDE.md | 3 ++- src/app.rs | 3 +++ src/cli.rs | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index be2489b..01a20e3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -41,7 +41,8 @@ Native CLI flags (`src/cli.rs`, applied in `FractalApp::apply_cli`): `--kind`, `--power`, `--julia re,im`, `--phoenix-p re,im`, `--lambda-l re,im`, `--palette`, `--share `, `--view re,im,half_height[,iterations]`, `--rendering-kind`, -`--yaw`/`--pitch` (3D camera, degrees), `--de`, `--buddhabrot`, +`--yaw`/`--pitch` (3D camera, degrees), `--de`, `--antialias` (2×2), +`--buddhabrot`, `--buddha-palette`. `--headless` (`src/headless.rs`) skips the window entirely: it builds the same view from the other flags, creates its own offscreen wgpu device, and renders straight to a PNG (`--width`/`--height`, diff --git a/src/app.rs b/src/app.rs index bb0d321..604b4e1 100644 --- a/src/app.rs +++ b/src/app.rs @@ -847,6 +847,9 @@ impl FractalApp { if cli.de { self.de_coloring = true; } + if cli.antialias { + self.antialias = true; + } if cli.buddhabrot { self.mode = FractalMode::Buddhabrot; } diff --git a/src/cli.rs b/src/cli.rs index 0107a10..327985a 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -74,6 +74,10 @@ pub struct Cli { #[arg(long)] pub de: bool, + /// Enable 2×2 antialiasing (supersampling; ~4× slower). + #[arg(long)] + pub antialias: bool, + /// Coloring palette index. #[arg(long, value_name = "INDEX")] pub palette: Option,